diff --git a/sns-topic.tf b/sns-topic.tf index 2366083..7d8d6af 100644 --- a/sns-topic.tf +++ b/sns-topic.tf @@ -34,6 +34,25 @@ data "aws_iam_policy_document" "sns_all" { sid = "allow-publish-clients-stmt" } + + statement { + actions = [ + "SNS:Publish" + ] + + effect = "Allow" + + principals { + type = "Service" + identifiers = ["events.amazonaws.com"] + } + + resources = [ + aws_sns_topic.default.arn, + ] + + sid = "allow-publish-event-bridge" + } } data "aws_iam_policy_document" "sns" { @@ -66,4 +85,23 @@ data "aws_iam_policy_document" "sns" { sid = "allow-publish-clients-stmt" } + + statement { + actions = [ + "SNS:Publish" + ] + + effect = "Allow" + + principals { + type = "Service" + identifiers = ["events.amazonaws.com"] + } + + resources = [ + aws_sns_topic.default.arn, + ] + + sid = "allow-publish-event-bridge" + } }