Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update node js versions + packages #514

Merged
merged 5 commits into from
Oct 19, 2023

Conversation

bryan-robitaille
Copy link
Contributor

Summary | Résumé

Updating Lambda Node JS version from 14 to 18 as requested by AWS.

We are ending support for Node.js 14 in AWS Lambda. This follows Node.js 14 End-Of-Life (EOL) reached on April 30, 2023 [1].

As described in the Lambda runtime support policy [2], end of support for language runtimes in Lambda happens in two stages. Starting November 27, 2023, Lambda will no longer apply security patches and other updates to the Node.js 14 runtime used by Lambda functions, and functions using Node.js 14 will no longer be eligible for technical support. In addition, you will no longer be able to create new Lambda functions using the Node.js 14 runtime. Starting January 25, 2024, you will no longer be able to update existing functions using the Node.js 14 runtime.

We recommend that you upgrade your existing Node.js 14 functions to Node.js 18 before November 27, 2023.

@github-actions
Copy link

⚠ Terrform update available

Terraform: 1.6.1 (using 1.4.2)
Terragrunt: 0.52.3 (using 0.46.3)

@github-actions
Copy link

Staging: app

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

⚠️   Warning: resources will be destroyed by this change!

Plan: 12 to add, 8 to change, 11 to destroy
Show summary
CHANGE NAME
add aws_ecs_task_definition.form_viewer
update aws_iam_policy.lambda_app_invoke
aws_lambda_function.archive_form_templates
aws_lambda_function.archiver
aws_lambda_function.audit_logs
aws_lambda_function.dead_letter_queue_consumer
aws_lambda_function.nagware
aws_lambda_function.reliability
aws_lambda_function.submission
recreate aws_lambda_layer_version.archive_form_templates_lib
aws_lambda_layer_version.archive_form_templates_nodejs
aws_lambda_layer_version.archiver_lib
aws_lambda_layer_version.archiver_nodejs
aws_lambda_layer_version.audit_logs_lib
aws_lambda_layer_version.dead_letter_queue_consumer_lib
aws_lambda_layer_version.nagware_lib
aws_lambda_layer_version.nagware_nodejs
aws_lambda_layer_version.reliability_lib
aws_lambda_layer_version.reliability_nodejs
aws_lambda_layer_version.submission_lib
Show plan
Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
-/+ destroy and then create replacement
 <= read (data resources)

Terraform will perform the following actions:

  # data.aws_iam_policy_document.lambda_app_invoke will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "aws_iam_policy_document" "lambda_app_invoke" {
      + id   = (known after apply)
      + json = (known after apply)

      + statement {
          + actions   = [
              + "lambda:InvokeFunction",
            ]
          + effect    = "Allow"
          + resources = [
              + "arn:aws:lambda:ca-central-1:687401027353:function:Submission",
            ]
        }
    }

  # data.template_file.form_viewer_task will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "template_file" "form_viewer_task" {
      + id       = (known after apply)
      + rendered = (known after apply)
      + template = jsonencode(
            [
              + {
                  + environment      = [
                      + {
                          + name  = "METRIC_PROVIDER"
                          + value = "${metric_provider}"
                        },
                      + {
                          + name  = "TRACER_PROVIDER"
                          + value = "${tracer_provider}"
                        },
                      + {
                          + name  = "SUBMISSION_API"
                          + value = "${submission_api}"
                        },
                      + {
                          + name  = "NEXTAUTH_URL"
                          + value = "${nextauth_url}"
                        },
                      + {
                          + name  = "REDIS_URL"
                          + value = "${redis_url}"
                        },
                      + {
                          + name  = "RELIABILITY_FILE_STORAGE"
                          + value = "${reliability_file_storage}"
                        },
                      + {
                          + name  = "RECAPTCHA_V3_SITE_KEY"
                          + value = "${recaptcha_public}"
                        },
                      + {
                          + name  = "TEMPORARY_TOKEN_TEMPLATE_ID"
                          + value = "${gc_temp_token_template_id}"
                        },
                      + {
                          + name  = "TEMPLATE_ID"
                          + value = "${gc_template_id}"
                        },
                      + {
                          + name  = "VAULT_FILE_STORAGE"
                          + value = "${vault_file_storage}"
                        },
                      + {
                          + name  = "COGNITO_ENDPOINT_URL"
                          + value = "${cognito_endpoint_url}"
                        },
                      + {
                          + name  = "COGNITO_CLIENT_ID"
                          + value = "${cognito_client_id}"
                        },
                      + {
                          + name  = "EMAIL_ADDRESS_CONTACT_US"
                          + value = "${email_address_contact_us}"
                        },
                      + {
                          + name  = "EMAIL_ADDRESS_SUPPORT"
                          + value = "${email_address_support}"
                        },
                      + {
                          + name  = "REPROCESS_SUBMISSION_QUEUE_URL"
                          + value = "${reprocess_submission_queue}"
                        },
                      + {
                          + name  = "AUDIT_LOG_QUEUE_URL"
                          + value = "${audit_log_queue_url}"
                        },
                    ]
                  + image            = "${image}"
                  + linuxParameters  = {
                      + capabilities = {
                          + drop = [
                              + "ALL",
                            ]
                        }
                    }
                  + logConfiguration = {
                      + logDriver = "awslogs"
                      + options   = {
                          + awslogs-group         = "${awslogs-group}"
                          + awslogs-region        = "${awslogs-region}"
                          + awslogs-stream-prefix = "${awslogs-stream-prefix}"
                        }
                    }
                  + name             = "form_viewer"
                  + portMappings     = [
                      + {
                          + containerPort = 3000
                        },
                    ]
                  + secrets          = [
                      + {
                          + name      = "NOTIFY_API_KEY"
                          + valueFrom = "${notify_api_key}"
                        },
                      + {
                          + name      = "RECAPTCHA_V3_SECRET_KEY"
                          + valueFrom = "${recaptcha_secret}"
                        },
                      + {
                          + name      = "DATABASE_URL"
                          + valueFrom = "${database_url}"
                        },
                      + {
                          + name      = "TOKEN_SECRET"
                          + valueFrom = "${token_secret}"
                        },
                      + {
                          + name      = "GC_NOTIFY_CALLBACK_BEARER_TOKEN"
                          + valueFrom = "${gc_notify_callback_bearer_token}"
                        },
                      + {
                          + name      = "FRESHDESK_API_KEY"
                          + valueFrom = "${freshdesk_api_key}"
                        },
                    ]
                },
            ]
        )
      + vars     = {
          + "audit_log_queue_url"             = "https://sqs.ca-central-1.amazonaws.com/687401027353/audit_log_queue"
          + "awslogs-group"                   = "Forms"
          + "awslogs-region"                  = "ca-central-1"
          + "awslogs-stream-prefix"           = "ecs-form-viewer"
          + "cognito_client_id"               = "17bsg3b2b7q5snon007rru264u"
          + "cognito_endpoint_url"            = "cognito-idp.ca-central-1.amazonaws.com/ca-central-1_Cguq9JNQ1"
          + "database_url"                    = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:server-database-url-0PSpE3"
          + "email_address_contact_us"        = "assistance+forms-formulaires@cds-snc.ca"
          + "email_address_support"           = "assistance+forms-formulaires@cds-snc.ca"
          + "freshdesk_api_key"               = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:freshdesk_api_key-sZbuR6"
          + "gc_notify_callback_bearer_token" = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:gc_notify_callback_bearer_token-wZbg6S"
          + "gc_temp_token_template_id"       = "b6885d06-d10a-422a-973f-05e274d9aa86"
          + "gc_template_id"                  = "8d597a1b-a1d6-4e3c-8421-042a2b4158b7"
          + "image"                           = "687401027353.dkr.ecr.ca-central-1.amazonaws.com/form_viewer_staging"
          + "metric_provider"                 = "stdout"
          + "nextauth_url"                    = "https://forms-staging.cdssandbox.xyz"
          + "notify_api_key"                  = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:notify_api_key-nV4keR"
          + "recaptcha_public"                = "6LfJDN4eAAAAAGvdRF7ZnQ7ciqdo1RQnQDFmh0VY"
          + "recaptcha_secret"                = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:recaptcha_secret-spUZxB"
          + "redis_url"                       = "gcforms-redis-rep-group.uwpetx.ng.0001.cac1.cache.amazonaws.com"
          + "reliability_file_storage"        = "forms-staging-reliability-file-storage"
          + "reprocess_submission_queue"      = "https://sqs.ca-central-1.amazonaws.com/687401027353/reprocess_submission_queue.fifo"
          + "submission_api"                  = "arn:aws:lambda:ca-central-1:687401027353:function:Submission"
          + "token_secret"                    = "arn:aws:secretsmanager:ca-central-1:687401027353:secret:token_secret-UyxxRR"
          + "tracer_provider"                 = "stdout"
          + "vault_file_storage"              = "forms-staging-vault-file-storage"
        }
    }

  # aws_ecs_task_definition.form_viewer will be created
  + resource "aws_ecs_task_definition" "form_viewer" {
      + arn                      = (known after apply)
      + container_definitions    = (known after apply)
      + cpu                      = "2048"
      + execution_role_arn       = "arn:aws:iam::687401027353:role/form-viewer"
      + family                   = "form-viewer"
      + id                       = (known after apply)
      + memory                   = "4096"
      + network_mode             = "awsvpc"
      + requires_compatibilities = [
          + "FARGATE",
        ]
      + revision                 = (known after apply)
      + skip_destroy             = false
      + tags                     = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + tags_all                 = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + task_role_arn            = "arn:aws:iam::687401027353:role/form-viewer"
    }

  # aws_iam_policy.lambda_app_invoke will be updated in-place
  ~ resource "aws_iam_policy" "lambda_app_invoke" {
        id          = "arn:aws:iam::687401027353:policy/lambda_app_invoke"
        name        = "lambda_app_invoke"
      ~ policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "lambda:InvokeFunction"
                      - Effect   = "Allow"
                      - Resource = "arn:aws:lambda:ca-central-1:687401027353:function:Submission"
                      - Sid      = ""
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> (known after apply)
        tags        = {
            "CostCentre" = "forms-platform-staging"
            "Terraform"  = "true"
        }
        # (5 unchanged attributes hidden)
    }

  # aws_lambda_function.archive_form_templates will be updated in-place
  ~ resource "aws_lambda_function" "archive_form_templates" {
        id                             = "ArchiveFormTemplates"
      ~ layers                         = [
          - "arn:aws:lambda:ca-central-1:687401027353:layer:archive_form_templates_lib_packages:2",
          - "arn:aws:lambda:ca-central-1:687401027353:layer:archive_form_templates_node_packages:14",
        ] -> (known after apply)
      ~ runtime                        = "nodejs14.x" -> "nodejs18.x"
        tags                           = {
            "CostCentre" = "forms-platform-staging"
            "Terraform"  = "true"
        }
        # (18 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # aws_lambda_function.archiver will be updated in-place
  ~ resource "aws_lambda_function" "archiver" {
        id                             = "Archiver"
      ~ layers                         = [
          - "arn:aws:lambda:ca-central-1:687401027353:layer:archiver_lib_packages:1",
          - "arn:aws:lambda:ca-central-1:687401027353:layer:archiver_node_packages:18",
        ] -> (known after apply)
      ~ runtime                        = "nodejs14.x" -> "nodejs18.x"
        tags                           = {
            "CostCentre" = "forms-platform-staging"
            "Terraform"  = "true"
        }
        # (18 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # aws_lambda_function.audit_logs will be updated in-place
  ~ resource "aws_lambda_function" "audit_logs" {
        id                             = "AuditLogs"
      ~ layers                         = [
          - "arn:aws:lambda:ca-central-1:687401027353:layer:audit_logs_node_packages:14",
        ] -> (known after apply)
      ~ runtime                        = "nodejs16.x" -> "nodejs18.x"
        tags                           = {
            "CostCentre" = "forms-platform-staging"
            "Terraform"  = "true"
        }
        # (18 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # aws_lambda_function.dead_letter_queue_consumer will be updated in-place
  ~ resource "aws_lambda_function" "dead_letter_queue_consumer" {
        id                             = "DeadLetterQueueConsumer"
      ~ layers                         = [
          - "arn:aws:lambda:ca-central-1:687401027353:layer:dead_letter_queue_consumer_node_packages:19",
        ] -> (known after apply)
      ~ runtime                        = "nodejs14.x" -> "nodejs18.x"
        tags                           = {
            "CostCentre" = "forms-platform-staging"
            "Terraform"  = "true"
        }
        # (18 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # aws_lambda_function.nagware will be updated in-place
  ~ resource "aws_lambda_function" "nagware" {
        id                             = "Nagware"
      ~ layers                         = [
          - "arn:aws:lambda:ca-central-1:687401027353:layer:nagware_lib_packages:10",
          - "arn:aws:lambda:ca-central-1:687401027353:layer:nagware_node_packages:19",
        ] -> (known after apply)
      ~ runtime                        = "nodejs14.x" -> "nodejs18.x"
        tags                           = {
            "CostCentre" = "forms-platform-staging"
            "Terraform"  = "true"
        }
        # (18 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # aws_lambda_function.reliability will be updated in-place
  ~ resource "aws_lambda_function" "reliability" {
        id                             = "Reliability"
      ~ layers                         = [
          - "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_lib_packages:108",
          - "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_node_packages:131",
        ] -> (known after apply)
      ~ runtime                        = "nodejs14.x" -> "nodejs18.x"
        tags                           = {
            "CostCentre" = "forms-platform-staging"
            "Terraform"  = "true"
        }
        # (18 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # aws_lambda_function.submission will be updated in-place
  ~ resource "aws_lambda_function" "submission" {
        id                             = "Submission"
      ~ layers                         = [
          - "arn:aws:lambda:ca-central-1:687401027353:layer:submission_node_packages:25",
        ] -> (known after apply)
      ~ runtime                        = "nodejs14.x" -> "nodejs18.x"
        tags                           = {
            "CostCentre" = "forms-platform-staging"
            "Terraform"  = "true"
        }
        # (18 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # aws_lambda_layer_version.archive_form_templates_lib must be replaced
-/+ resource "aws_lambda_layer_version" "archive_form_templates_lib" {
      ~ arn                         = "arn:aws:lambda:ca-central-1:687401027353:layer:archive_form_templates_lib_packages:2" -> (known after apply)
      - compatible_architectures    = [] -> null
      ~ compatible_runtimes         = [ # forces replacement
          - "nodejs14.x",
          + "nodejs18.x",
        ]
      ~ created_date                = "2023-07-11T19:44:43.271+0000" -> (known after apply)
      ~ id                          = "arn:aws:lambda:ca-central-1:687401027353:layer:archive_form_templates_lib_packages:2" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:ca-central-1:687401027353:layer:archive_form_templates_lib_packages" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_size            = 1306 -> (known after apply)
      ~ version                     = "2" -> (known after apply)
        # (4 unchanged attributes hidden)
    }

  # aws_lambda_layer_version.archive_form_templates_nodejs must be replaced
-/+ resource "aws_lambda_layer_version" "archive_form_templates_nodejs" {
      ~ arn                         = "arn:aws:lambda:ca-central-1:687401027353:layer:archive_form_templates_node_packages:14" -> (known after apply)
      - compatible_architectures    = [] -> null
      ~ compatible_runtimes         = [ # forces replacement
          - "nodejs14.x",
          + "nodejs18.x",
        ]
      ~ created_date                = "2023-09-11T19:23:01.513+0000" -> (known after apply)
      ~ id                          = "arn:aws:lambda:ca-central-1:687401027353:layer:archive_form_templates_node_packages:14" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:ca-central-1:687401027353:layer:archive_form_templates_node_packages" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_hash            = "U7YTzsbYATYmRnzFQ2nphx91ATD+XeGW0/0eq7JO374=" -> "Oxv9OpU5rZNCl49AW8v6HKJdYtXHKWoWhglII+GPCBA=" # forces replacement
      ~ source_code_size            = 2444541 -> (known after apply)
      ~ version                     = "14" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # aws_lambda_layer_version.archiver_lib must be replaced
-/+ resource "aws_lambda_layer_version" "archiver_lib" {
      ~ arn                         = "arn:aws:lambda:ca-central-1:687401027353:layer:archiver_lib_packages:1" -> (known after apply)
      - compatible_architectures    = [] -> null
      ~ compatible_runtimes         = [ # forces replacement
          - "nodejs12.x",
          - "nodejs14.x",
          + "nodejs18.x",
        ]
      ~ created_date                = "2023-03-22T13:34:20.330+0000" -> (known after apply)
      ~ id                          = "arn:aws:lambda:ca-central-1:687401027353:layer:archiver_lib_packages:1" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:ca-central-1:687401027353:layer:archiver_lib_packages" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_size            = 830 -> (known after apply)
      ~ version                     = "1" -> (known after apply)
        # (4 unchanged attributes hidden)
    }

  # aws_lambda_layer_version.archiver_nodejs must be replaced
-/+ resource "aws_lambda_layer_version" "archiver_nodejs" {
      ~ arn                         = "arn:aws:lambda:ca-central-1:687401027353:layer:archiver_node_packages:18" -> (known after apply)
      - compatible_architectures    = [] -> null
      ~ compatible_runtimes         = [ # forces replacement
          - "nodejs12.x",
          - "nodejs14.x",
          + "nodejs18.x",
        ]
      ~ created_date                = "2023-09-11T19:22:45.513+0000" -> (known after apply)
      ~ id                          = "arn:aws:lambda:ca-central-1:687401027353:layer:archiver_node_packages:18" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:ca-central-1:687401027353:layer:archiver_node_packages" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_hash            = "5U9x5dCmwJ6xIpguaeoTzEw2t6BZiEhws8ZozxMZ5Hw=" -> "PqiM+DEwZJ4Zk2Bl4VpulJsVLizmg6qLiEGU9IwR8aA=" # forces replacement
      ~ source_code_size            = 4619618 -> (known after apply)
      ~ version                     = "18" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # aws_lambda_layer_version.audit_logs_lib must be replaced
-/+ resource "aws_lambda_layer_version" "audit_logs_lib" {
      ~ arn                         = "arn:aws:lambda:ca-central-1:687401027353:layer:audit_logs_node_packages:14" -> (known after apply)
      - compatible_architectures    = [] -> null
      ~ compatible_runtimes         = [ # forces replacement
          - "nodejs16.x",
          + "nodejs18.x",
        ]
      ~ created_date                = "2023-09-11T19:22:56.178+0000" -> (known after apply)
      ~ id                          = "arn:aws:lambda:ca-central-1:687401027353:layer:audit_logs_node_packages:14" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:ca-central-1:687401027353:layer:audit_logs_node_packages" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_hash            = "vduYlNH7TwZ3UIpgcQk3oMNmQh6TNJCXN7J0rLAnrdg=" -> "26oulxvbkVkCzRjTMZJxL4B8G9fZ8aJDac1YbrYigA4=" # forces replacement
      ~ source_code_size            = 3180135 -> (known after apply)
      ~ version                     = "14" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # aws_lambda_layer_version.dead_letter_queue_consumer_lib must be replaced
-/+ resource "aws_lambda_layer_version" "dead_letter_queue_consumer_lib" {
      ~ arn                         = "arn:aws:lambda:ca-central-1:687401027353:layer:dead_letter_queue_consumer_node_packages:19" -> (known after apply)
      - compatible_architectures    = [] -> null
      ~ compatible_runtimes         = [ # forces replacement
          - "nodejs14.x",
          + "nodejs18.x",
        ]
      ~ created_date                = "2023-09-11T19:23:06.837+0000" -> (known after apply)
      ~ id                          = "arn:aws:lambda:ca-central-1:687401027353:layer:dead_letter_queue_consumer_node_packages:19" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:ca-central-1:687401027353:layer:dead_letter_queue_consumer_node_packages" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_hash            = "MHuTntHaUrwEUfSxCwtR0AxiqeGbHXWEwDZ8VsIle7Q=" -> "xqsmTOmjZ1qsi5fkPhQOCIg0f/aPzcH+7DHw+iXv7qc=" # forces replacement
      ~ source_code_size            = 2400073 -> (known after apply)
      ~ version                     = "19" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # aws_lambda_layer_version.nagware_lib must be replaced
-/+ resource "aws_lambda_layer_version" "nagware_lib" {
      ~ arn                         = "arn:aws:lambda:ca-central-1:687401027353:layer:nagware_lib_packages:10" -> (known after apply)
      - compatible_architectures    = [] -> null
      ~ compatible_runtimes         = [ # forces replacement
          - "nodejs12.x",
          - "nodejs14.x",
          + "nodejs18.x",
        ]
      ~ created_date                = "2023-08-16T12:31:08.872+0000" -> (known after apply)
      ~ id                          = "arn:aws:lambda:ca-central-1:687401027353:layer:nagware_lib_packages:10" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:ca-central-1:687401027353:layer:nagware_lib_packages" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_size            = 4427 -> (known after apply)
      ~ version                     = "10" -> (known after apply)
        # (4 unchanged attributes hidden)
    }

  # aws_lambda_layer_version.nagware_nodejs must be replaced
-/+ resource "aws_lambda_layer_version" "nagware_nodejs" {
      ~ arn                         = "arn:aws:lambda:ca-central-1:687401027353:layer:nagware_node_packages:19" -> (known after apply)
      - compatible_architectures    = [] -> null
      ~ compatible_runtimes         = [ # forces replacement
          - "nodejs12.x",
          - "nodejs14.x",
          + "nodejs18.x",
        ]
      ~ created_date                = "2023-09-11T19:22:39.305+0000" -> (known after apply)
      ~ id                          = "arn:aws:lambda:ca-central-1:687401027353:layer:nagware_node_packages:19" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:ca-central-1:687401027353:layer:nagware_node_packages" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_hash            = "5y9ICbD+oc2wk8ZhMSXRETeD7pa29ShwFT11/dTcx8o=" -> "Xq14yXpNeARsucfbbNblc9+iaxEjX0qUZN0s/Hq4bhw=" # forces replacement
      ~ source_code_size            = 3754109 -> (known after apply)
      ~ version                     = "19" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # aws_lambda_layer_version.reliability_lib must be replaced
-/+ resource "aws_lambda_layer_version" "reliability_lib" {
      ~ arn                         = "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_lib_packages:108" -> (known after apply)
      - compatible_architectures    = [] -> null
      ~ compatible_runtimes         = [ # forces replacement
          - "nodejs12.x",
          - "nodejs14.x",
          + "nodejs18.x",
        ]
      ~ created_date                = "2023-08-09T13:26:45.978+0000" -> (known after apply)
      ~ id                          = "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_lib_packages:108" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_lib_packages" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_size            = 9119 -> (known after apply)
      ~ version                     = "108" -> (known after apply)
        # (4 unchanged attributes hidden)
    }

  # aws_lambda_layer_version.reliability_nodejs must be replaced
-/+ resource "aws_lambda_layer_version" "reliability_nodejs" {
      ~ arn                         = "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_node_packages:131" -> (known after apply)
      - compatible_architectures    = [] -> null
      ~ compatible_runtimes         = [ # forces replacement
          - "nodejs12.x",
          - "nodejs14.x",
          + "nodejs18.x",
        ]
      ~ created_date                = "2023-09-11T19:22:50.732+0000" -> (known after apply)
      ~ id                          = "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_node_packages:131" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:ca-central-1:687401027353:layer:reliability_node_packages" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_hash            = "F52GWueXwxewlrWxEH64raGzpZcNFwHr/FatV5jJ9xw=" -> "8oJpwgXUf/wUa1DcIqPeTOxyojE+9eyaAW6kl1GlYII=" # forces replacement
      ~ source_code_size            = 6386940 -> (known after apply)
      ~ version                     = "131" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # aws_lambda_layer_version.submission_lib must be replaced
-/+ resource "aws_lambda_layer_version" "submission_lib" {
      ~ arn                         = "arn:aws:lambda:ca-central-1:687401027353:layer:submission_node_packages:25" -> (known after apply)
      - compatible_architectures    = [] -> null
      ~ compatible_runtimes         = [ # forces replacement
          - "nodejs12.x",
          - "nodejs14.x",
          + "nodejs18.x",
        ]
      ~ created_date                = "2023-09-11T19:23:11.985+0000" -> (known after apply)
      ~ id                          = "arn:aws:lambda:ca-central-1:687401027353:layer:submission_node_packages:25" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:ca-central-1:687401027353:layer:submission_node_packages" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_hash            = "i8of9kNVSJIuOYbUGjWeaSIDvq/HFHW9P4PQnljHaaM=" -> "eFofuYogiE0sdyB63rWyi3dRFsMjdRKH9tAHPbPUjhU=" # forces replacement
      ~ source_code_size            = 3087718 -> (known after apply)
      ~ version                     = "25" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

Plan: 12 to add, 8 to change, 11 to destroy.

Warning: Argument is deprecated

  with aws_s3_bucket.reliability_file_storage,
  on s3.tf line 4, in resource "aws_s3_bucket" "reliability_file_storage":
   4: resource "aws_s3_bucket" "reliability_file_storage" {

Use the aws_s3_bucket_lifecycle_configuration resource instead

(and 17 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.cron_2am_every_day"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.cron_3am_every_day"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.cron_4am_every_day"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.cron_5am_every_business_day"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.archive_form_templates"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.archiver"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.audit_logs"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.dead_letter_queue_consumer"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.nagware"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.reliability"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.submission"]

28 tests, 17 passed, 11 warnings, 0 failures, 0 exceptions

Copy link
Contributor

@craigzour craigzour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@bryan-robitaille bryan-robitaille merged commit 372649c into develop Oct 19, 2023
4 checks passed
@bryan-robitaille bryan-robitaille deleted the chore/update_lambda_nodejs_versions branch October 19, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants