File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
infrastructure/terraform/components/app Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -106,4 +106,35 @@ data "aws_iam_policy_document" "kms" {
106106 ]
107107 }
108108 }
109+
110+ statement {
111+ sid = " AllowEventBridgeToEncryptSpecificQueue"
112+ effect = " Allow"
113+
114+ principals {
115+ type = " Service"
116+ identifiers = [" events.amazonaws.com" ]
117+ }
118+
119+ actions = [
120+ " kms:GenerateDataKey*" ,
121+ " kms:Decrypt" ,
122+ ]
123+
124+ resources = [" *" ]
125+
126+ condition {
127+ test = " StringEquals"
128+ variable = " kms:ViaService"
129+ values = [" sqs.${ var . region } .amazonaws.com" ]
130+ }
131+
132+ condition {
133+ test = " StringEquals"
134+ variable = " kms:EncryptionContext:aws:sqs:arn"
135+ values = [
136+ module . sqs_validate_letter_template_files . sqs_queue_arn
137+ ]
138+ }
139+ }
109140}
You can’t perform that action at this time.
0 commit comments