Skip to content

Commit 07d6e45

Browse files
CCM-10283: Add stuff from other branch to KMS policy
1 parent 667086a commit 07d6e45

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

infrastructure/terraform/components/acct/module_sandbox_kms.tf

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,33 @@ data "aws_iam_policy_document" "kms" {
135135
]
136136
}
137137
}
138+
139+
statement {
140+
sid = "AllowEventBridgeAccessToLetterValidationQueue"
141+
effect = "Allow"
142+
143+
principals {
144+
type = "Service"
145+
identifiers = ["events.amazonaws.com"]
146+
}
147+
148+
actions = [
149+
"kms:GenerateDataKey*",
150+
"kms:Decrypt",
151+
]
152+
153+
resources = ["*"]
154+
155+
condition {
156+
test = "ArnLike"
157+
variable = "kms:EncryptionContext:aws:sqs:arn"
158+
values = ["arn:aws:sqs:${var.region}:${var.aws_account_id}:*-validate-letter-template-files-queue"]
159+
}
160+
161+
condition {
162+
test = "ArnLike"
163+
variable = "aws:SourceArn"
164+
values = ["arn:aws:events:${var.region}:${var.aws_account_id}:rule/*-quarantine-scan-passed-for-upload"]
165+
}
166+
}
138167
}

0 commit comments

Comments
 (0)