Skip to content

Commit f16de2c

Browse files
committed
Use inline policy to allow assuming cdk* roles
1 parent e19a8ce commit f16de2c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

org-formation/650-identity-providers/_tasks.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,18 @@ GithubOidcNbConvertDeploy:
836836
ProviderArn: !CopyValue [ !Sub '${resourcePrefix}-${appName}-ProviderArn' ]
837837
ProviderRoleName: !Sub ${resourcePrefix}-${appName}-nbconvert-deploy
838838
MaxSessionDuration: 7200
839-
ManagedPolicyArns:
840-
- "arn:aws:iam::${AWS::AccountId}:policy/cdk-assume-role-policy"
839+
PolicyDocument: !Sub |
840+
{
841+
"Version": "2012-10-17",
842+
"Statement": [
843+
{
844+
"Sid": "AssumeRoleStatement",
845+
"Effect": "Allow",
846+
"Action": "sts:AssumeRole",
847+
"Resource": "arn:aws:iam::${AWS::AccountId}:role/cdk-*-role-*-us-east-1"
848+
}
849+
]
850+
}
841851
TemplatingContext:
842852
GitHubOrg: "Sage-Bionetworks"
843853
Repositories:

0 commit comments

Comments
 (0)