File tree Expand file tree Collapse file tree 1 file changed +29
-11
lines changed
infrastructure/stacks/account_wide Expand file tree Collapse file tree 1 file changed +29
-11
lines changed Original file line number Diff line number Diff line change @@ -282,24 +282,42 @@ module "scheduler_encryption_key" {
282282 description = " Encryption key for EventBridge scheduler in ${ var . environment } environment"
283283 additional_policy_statements = [
284284 {
285- " Sid" : " AllowEventBridgeSchedulerToUseKMS" ,
286- " Effect" : " Allow" ,
287- " Principal" : {
288- " Service" : " scheduler.amazonaws.com"
289- },
290- " Action" : [
285+ Sid = " AllowEventBridgeSchedulerToUseKMS"
286+ Effect = " Allow"
287+ Principal = {
288+ Service = [ " scheduler.amazonaws.com" ]
289+ }
290+ Action = [
291291 " kms:CreateGrant" ,
292292 " kms:RetireGrant" ,
293293 " kms:Decrypt" ,
294294 " kms:GenerateDataKey*" ,
295295 " kms:DescribeKey"
296- ],
297- " Resource" : " *" ,
298- " Condition" : {
299- " StringEquals" : {
300- " aws:SourceAccount" : data.aws_caller_identity.current.account_id
296+ ]
297+ Resource = " *"
298+ Condition = {
299+ StringEquals = {
300+ " aws:SourceAccount" = data.aws_caller_identity.current.account_id
301301 }
302302 }
303+ },
304+ {
305+ Sid = " AllowGitHubRunnerAccess"
306+ Effect = " Allow"
307+ Principal = {
308+ AWS = [
309+ " arn:aws:iam::${ data . aws_caller_identity . current . account_id } :role/${ local . account_prefix } -${ var . app_github_runner_role_name } " ,
310+ " arn:aws:iam::${ data . aws_caller_identity . current . account_id } :role/${ local . account_prefix } -${ var . account_github_runner_role_name } "
311+ ]
312+ }
313+ Action = [
314+ " kms:Decrypt" ,
315+ " kms:Encrypt" ,
316+ " kms:GenerateDataKey*" ,
317+ " kms:DescribeKey"
318+ ]
319+ Resource = " *"
320+ Condition = {}
303321 }
304322 ]
305323}
You can’t perform that action at this time.
0 commit comments