File tree Expand file tree Collapse file tree
infrastructure/terraform/components/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ data "aws_iam_policy_document" "amendments_queue_policy" {
3535 ]
3636
3737 resources = [
38- " arn:aws:sqs:${ var . region } :${ var . aws_account_id } :${ local . csi } -amendments-queue.fifo"
38+ " arn:aws:sqs:${ var . region } :${ var . aws_account_id } :${ var . project } - ${ var . environment } - ${ var . component } -amendments-queue.fifo"
3939 ]
4040
4141 condition {
Original file line number Diff line number Diff line change @@ -44,4 +44,31 @@ data "aws_iam_policy_document" "supplier_events_queue_policy" {
4444 values = [module . eventsub . sns_topic_supplier . arn ]
4545 }
4646 }
47+
48+ statement {
49+ sid = " AllowSNSPermissions"
50+ effect = " Allow"
51+
52+ principals {
53+ type = " Service"
54+ identifiers = [" sns.amazonaws.com" ]
55+ }
56+
57+ actions = [
58+ " sqs:SendMessage" ,
59+ " sqs:ListQueueTags" ,
60+ " sqs:GetQueueUrl" ,
61+ " sqs:GetQueueAttributes" ,
62+ ]
63+
64+ resources = [
65+ " arn:aws:sqs:${ var . region } :${ var . aws_account_id } :${ var . project } -${ var . environment } -${ var . component } -amendments-queue.fifo"
66+ ]
67+
68+ condition {
69+ test = " ArnEquals"
70+ variable = " aws:SourceArn"
71+ values = [module . eventsub . sns_topic_supplier . arn ]
72+ }
73+ }
4774}
You can’t perform that action at this time.
0 commit comments