Skip to content

Commit ef461b5

Browse files
author
iru
authored
chore(permission): narrow down sqs-sns (#39)
Co-authored-by: Michael Samuel <sq-msamuel@users.noreply.github.com
1 parent b42a86d commit ef461b5

File tree

1 file changed

+5
-0
lines changed
  • modules/infrastructure/sqs-sns-subscription

1 file changed

+5
-0
lines changed

modules/infrastructure/sqs-sns-subscription/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ data "aws_iam_policy_document" "this" {
2323
identifiers = ["sns.amazonaws.com"]
2424
type = "Service"
2525
}
26+
condition {
27+
test = "ArnEquals"
28+
variable = "aws:SourceArn"
29+
values = [var.sns_topic_arn]
30+
}
2631
actions = [
2732
"sqs:SendMessage",
2833
"sqs:SendMessageBatch"

0 commit comments

Comments
 (0)