wellcomecollection / platform-infrastructure

:building_construction: Infrastructure for the Wellcome Digital Platform
MIT License
24 stars 8 forks source link

optional chaining in case query is not defined/null #440

Closed agnesgaroux closed 3 months ago

agnesgaroux commented 3 months ago

What's changing and why?

We've seen errors in this lambda, which should be fixed by this addition of optional chaining in case query is null

terraform plan diff

Terraform will perform the following actions:

  # module.slack_alerts_for_5xx.aws_lambda_function.lambda_function will be updated in-place
  ~ resource "aws_lambda_function" "lambda_function" {
        id                             = "send_slack_alert_for_5xx_errors"
      ~ last_modified                  = "2024-05-03T08:25:21.000+0000" -> (known after apply)
      ~ source_code_hash               = "Oq9I+XxfJXbNIs2Af3laOK5mksm6C/gzV4zRdDFQyQ4=" -> "Muyhd941OhW1yIHHSbtKNyrHywvymTj0LntBt9NxVsE="
        tags                           = {}
        # (27 unchanged attributes hidden)

        # (5 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
agnesgaroux commented 3 months ago

Applied 2024-07-10