File tree Expand file tree Collapse file tree 6 files changed +25
-0
lines changed
terraform/account-wide-infrastructure Expand file tree Collapse file tree 6 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ module "lambda_errors_cloudwatch_metric_alarm_dev" {
22 source = " ../modules/lambda-errors-metric-alarm"
33 name_prefix = " nhsd-nrlf--prod"
44
5+ notification_emails = local. notification_emails
6+
57 evaluation_periods = 1
68 period = 60
79 threshold = 1
Original file line number Diff line number Diff line change 11data "aws_secretsmanager_secret_version" "identities_account_id" {
22 secret_id = aws_secretsmanager_secret. identities_account_id . name
33}
4+
5+ data "aws_secretsmanager_secret" "emails" {
6+ name = " ${ local . prefix } -emails"
7+ }
8+
9+ data "aws_secretsmanager_secret_version" "emails" {
10+ secret_id = data. aws_secretsmanager_secret . emails . id
11+ }
Original file line number Diff line number Diff line change 33 project = " nhsd-nrlf"
44 environment = terraform. workspace
55 prefix = " ${ local . project } --${ local . environment } "
6+
7+ notification_emails = nonsensitive (toset (tolist (jsondecode (data. aws_secretsmanager_secret_version . emails . secret_string ))))
68}
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ module "lambda_errors_cloudwatch_metric_alarm_dev" {
22 source = " ../modules/lambda-errors-metric-alarm"
33 name_prefix = " nhsd-nrlf--test"
44
5+ notification_emails = local. notification_emails
6+
57 evaluation_periods = 1
68 period = 60
79 threshold = 1
Original file line number Diff line number Diff line change 11data "aws_secretsmanager_secret_version" "identities_account_id" {
22 secret_id = aws_secretsmanager_secret. identities_account_id . name
33}
4+
5+
6+ data "aws_secretsmanager_secret" "emails" {
7+ name = " ${ local . prefix } -emails"
8+ }
9+
10+ data "aws_secretsmanager_secret_version" "emails" {
11+ secret_id = data. aws_secretsmanager_secret . emails . id
12+ }
Original file line number Diff line number Diff line change 33 project = " nhsd-nrlf"
44 environment = terraform. workspace
55 prefix = " ${ local . project } --${ local . environment } "
6+
7+ notification_emails = nonsensitive (toset (tolist (jsondecode (data. aws_secretsmanager_secret_version . emails . secret_string ))))
68}
You can’t perform that action at this time.
0 commit comments