From 31c887ed114187e7e662832f01d40247b19ddcd3 Mon Sep 17 00:00:00 2001 From: badra001 Date: Thu, 1 Apr 2021 17:25:36 -0400 Subject: [PATCH] fix --- ses-domain/main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ses-domain/main.tf b/ses-domain/main.tf index e89d5c9..1335776 100644 --- a/ses-domain/main.tf +++ b/ses-domain/main.tf @@ -252,8 +252,8 @@ resource "null_resource" "to_production" { #} resource "aws_sns_topic" "ses_event" { - for_each = local.enable_sns_events ? 1 : 0 - name = local.ses_sns_topic + count = local.enable_sns_events ? 1 : 0 + name = local.ses_sns_topic # kms_master_key_id = data.aws_kms_alias.sns_key.id } @@ -265,7 +265,7 @@ resource "aws_sns_topic_policy" "ses_event" { } resource "aws_ses_identity_notification_topic" "ses_event" { - for_each = toset(local.ses_event_types) + for_each = local.enable_sns_events ? toset(local.ses_event_types) : toset([]) # topic_arn = aws_sns_topic.ses_event[0].arn # topic_arn = coalesce(aws_sns_topic.ses_event[*].arn...) topic_arn = concat(aws_sns_topic.ses_event[*].arn, [""])[0]