Skip to content

Commit

Permalink
Allow event bridge sns publish
Browse files Browse the repository at this point in the history
  • Loading branch information
lzrocha committed Jan 27, 2021
1 parent e3a675c commit 4eb4a0a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions sns-topic.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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"
}
}

0 comments on commit 4eb4a0a

Please sign in to comment.