From 4eb4a0a158e72a72290c5000cc19d650e24949a8 Mon Sep 17 00:00:00 2001 From: lzrocha Date: Wed, 27 Jan 2021 20:31:34 +1100 Subject: [PATCH] Allow event bridge sns publish --- sns-topic.tf | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) 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" + } }