Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Apr 1, 2021
1 parent 856d6d9 commit 31c887e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ses-domain/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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]
Expand Down

0 comments on commit 31c887e

Please sign in to comment.