Skip to content

Commit

Permalink
try to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Apr 1, 2021
1 parent 8665fe0 commit 2a0f559
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ses-domain/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -252,20 +252,21 @@ resource "null_resource" "to_production" {
#}

resource "aws_sns_topic" "ses_event" {
count = local.enable_sns_events ? 1 : 0
name = local.ses_sns_topic
for_each = local.enable_sns_events ? 1 : 0
name = local.ses_sns_topic
# kms_master_key_id = data.aws_kms_alias.sns_key.id
}

resource "aws_sns_topic_policy" "ses_event" {
count = local.enable_sns_events ? 1 : 0
arn = aws_sns_topic.ses_event[0].arn
arn = coalesce(aws_sns_topic.ses_event[*].arn...)
policy = data.aws_iam_policy_document.ses_event.json
}

resource "aws_ses_identity_notification_topic" "ses_event" {
for_each = toset(local.ses_event_types)
topic_arn = aws_sns_topic.ses_event[0].arn
for_each = toset(local.ses_event_types)
# topic_arn = aws_sns_topic.ses_event[0].arn
topic_arn = coalesce(aws_sns_topic.ses_event[*].arn...)
notification_type = title(each.key)
identity = aws_ses_domain_identity.this.domain
include_original_headers = true
Expand Down

0 comments on commit 2a0f559

Please sign in to comment.