We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c16f82 commit 8c2408fCopy full SHA for 8c2408f
1 file changed
infrastructure/terraform/components/api/module_sqs_amendments_queue.tf
@@ -16,4 +16,32 @@ module "amendments_queue" {
16
visibility_timeout_seconds = 60
17
18
create_dlq = true
19
+ sqs_policy_overload = data.aws_iam_policy_document.amendments_queue_policy.json
20
+}
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_supplier.arn]
45
46
47
}
0 commit comments