Skip to content

Commit

Permalink
feat(baseline): add sqs extension
Browse files Browse the repository at this point in the history
  • Loading branch information
roleyfoley committed Dec 12, 2023
1 parent 284c716 commit e975535
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions aws/extensions/cmk_sqs_access/extension.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[#ftl]

[@addExtension
id="cmk_sqs_access"
aliases=[
"_cmk_sqs_access"
]
description=[
"Grants access to a CMK from the SQS Service"
]
supportedTypes=[
BASELINE_KEY_COMPONENT_TYPE
]
/]

[#macro shared_extension_cmk_sqs_access_deployment_setup occurrence ]

[@Policy
[
getPolicyStatement(
[
"kms:GenerateDataKey*",
"kms:Decrypt"
],
"*"
{
"Service" : "sqs.amazonaws.com"
},
{
"StringEquals": {
"aws:SourceAccount" : {
"Ref": "AWS::AccountId"
}
}
},
true,
"SQS Service Principal Access"
)
]
/]

[/#macro]

0 comments on commit e975535

Please sign in to comment.