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 @@ -40,6 +40,7 @@ module "allocation_lambda" {
4040 }
4141}
4242
43+
4344data "aws_iam_policy_document" "allocation_lambda" {
4445 statement {
4546 sid = " KMSPermissions"
@@ -54,4 +55,18 @@ data "aws_iam_policy_document" "allocation_lambda" {
5455 module . kms . key_arn ,
5556 ]
5657 }
58+
59+ statement {
60+ sid = " AllowQueueAccess"
61+ effect = " Allow"
62+
63+ actions = [
64+ " sqs:SendMessage" ,
65+ " sqs:GetQueueAttributes" ,
66+ ]
67+
68+ resources = [
69+ module . amendments_queue . sqs_queue_arn
70+ ]
71+ }
5772}
Original file line number Diff line number Diff line change @@ -18,31 +18,3 @@ module "amendments_queue" {
1818 create_dlq = true
1919 sqs_policy_overload = data. aws_iam_policy_document . amendments_queue_policy . json
2020}
21-
22- data "aws_iam_policy_document" "amendments_queue_policy" {
23- version = " 2012-10-17"
24- statement {
25- sid = " AllowSNSToSendMessage"
26- effect = " Allow"
27-
28- principals {
29- type = " Service"
30- identifiers = [" sns.amazonaws.com" ]
31- }
32-
33- actions = [
34- " sqs:SendMessage"
35- ]
36-
37- resources = [
38- " arn:aws:sqs:${ var . region } :${ var . aws_account_id } :${ local . csi } -amendments-queue.fifo"
39- ]
40-
41- condition {
42- test = " ArnEquals"
43- variable = " aws:SourceArn"
44- values = [module . eventsub . sns_topic_event_bus . arn , module . eventsub . sns_topic_supplier . arn ]
45-
46- }
47- }
48- }
You can’t perform that action at this time.
0 commit comments