Skip to content

Commit

Permalink
Merge pull request #288 from nationalarchives/unencrypt-environment-e…
Browse files Browse the repository at this point in the history
…nv-var

Do not apply encryption to ENVIRONMENT env var
  • Loading branch information
annielh authored Aug 6, 2024
2 parents 07de40a + d592acb commit 5adb615
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lambda/notifications.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resource "aws_lambda_function" "notifications_lambda_function" {
GOV_UK_NOTIFY_API_KEY = aws_kms_ciphertext.environment_vars_notifications["gov_uk_notify_api_key"].ciphertext_blob
SEND_GOV_UK_NOTIFICATIONS = aws_kms_ciphertext.environment_vars_notifications["send_gov_uk_notifications"].ciphertext_blob
TDR_INBOX_EMAIL = aws_kms_ciphertext.environment_vars_notifications["tdr_inbox_email"].ciphertext_blob
ENVIRONMENT = aws_kms_ciphertext.environment_vars_notifications["environment"].ciphertext_blob
ENVIRONMENT = local.environment
}
}

Expand All @@ -53,7 +53,6 @@ resource "aws_kms_ciphertext" "environment_vars_notifications" {
gov_uk_notify_api_key = data.aws_ssm_parameter.gov_uk_notify_api_key[0].value
send_gov_uk_notifications = local.environment == "prod"
tdr_inbox_email = local.environment == "prod" ? "[email protected]" : "[email protected]"
environment = local.environment
}
# This lambda is created by the tdr-terraform-backend project as it only exists in the management account so we can't use any KMS keys
# created by the terraform environments project as they won't exist when we first run the backend project.
Expand Down

0 comments on commit 5adb615

Please sign in to comment.