File tree Expand file tree Collapse file tree 6 files changed +7
-10
lines changed
terraform/account-wide-infrastructure
modules/lambda-errors-metric-alarm Expand file tree Collapse file tree 6 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 44 environment = terraform. workspace
55 prefix = " ${ local . project } --${ local . environment } "
66
7- notification_emails = nonsensitive ( toset ( tolist (jsondecode (data. aws_secretsmanager_secret_version . emails . secret_string )) ))
7+ notification_emails = tolist (jsondecode (data. aws_secretsmanager_secret_version . emails . secret_string ))
88}
Original file line number Diff line number Diff line change @@ -7,10 +7,6 @@ resource "aws_secretsmanager_secret" "backup_destination_parameters" {
77 description = " Parameters used to configure the backup destination"
88}
99
10- resource "aws_secretsmanager_secret" "notification_email_addresses" {
11- name = " ${ local . prefix } -dev-notification-email-addresses"
12- }
13-
1410resource "aws_secretsmanager_secret" "dev_smoke_test_apigee_app" {
1511 name = " ${ local . prefix } --dev--apigee-app--smoke-test"
1612 description = " APIGEE App used to run Smoke Tests against the DEV environment"
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ resource "aws_sns_topic" "sns_topic" {
44}
55
66resource "aws_sns_topic_subscription" "sns_subscription" {
7- for_each = var. notification_emails
7+ count = length ( var. notification_emails )
88 topic_arn = aws_sns_topic. sns_topic . arn
99 protocol = " email"
10- endpoint = sensitive (each . value )
10+ endpoint = var . notification_emails [ count . index ]
1111}
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ variable "kms_deletion_window_in_days" {
2727}
2828
2929variable "notification_emails" {
30- type = set (string )
30+ type = list (string )
31+ sensitive = true
3132 description = " The email addresses to which notifications will be sent."
3233 default = []
3334}
Original file line number Diff line number Diff line change 44 environment = terraform. workspace
55 prefix = " ${ local . project } --${ local . environment } "
66
7- notification_emails = nonsensitive ( toset ( tolist (jsondecode (data. aws_secretsmanager_secret_version . emails . secret_string )) ))
7+ notification_emails = tolist (jsondecode (data. aws_secretsmanager_secret_version . emails . secret_string ))
88}
Original file line number Diff line number Diff line change 44 environment = terraform. workspace
55 prefix = " ${ local . project } --${ local . environment } "
66
7- notification_emails = nonsensitive ( toset ( tolist (jsondecode (data. aws_secretsmanager_secret_version . emails . secret_string )) ))
7+ notification_emails = tolist (jsondecode (data. aws_secretsmanager_secret_version . emails . secret_string ))
88}
You can’t perform that action at this time.
0 commit comments