File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -200,12 +200,24 @@ export namespace InitialSetup {
200200 new iam . ServicePrincipal ( 'codebuild.amazonaws.com' ) ,
201201 new iam . ServicePrincipal ( 'lambda.amazonaws.com' ) ,
202202 new iam . ServicePrincipal ( 'events.amazonaws.com' ) ,
203- new iam . ArnPrincipal ( roleArn ) ,
204203 ) ,
205204 managedPolicies : [ iam . ManagedPolicy . fromAwsManagedPolicyName ( 'AdministratorAccess' ) ] ,
206205 maxSessionDuration : buildTimeout ,
207206 } ) ;
208207
208+ pipelineRole . assumeRolePolicy ?. addStatements (
209+ new iam . PolicyStatement ( {
210+ effect : iam . Effect . ALLOW ,
211+ principals : [ new iam . AccountPrincipal ( stack . account ) ] ,
212+ actions : [ 'sts:AssumeRole' ] ,
213+ conditions : {
214+ ArnLike : {
215+ 'aws:PrincipalARN' : `arn:aws:iam::${ stack . account } :role/${ roleName } ` ,
216+ } ,
217+ } ,
218+ } ) ,
219+ ) ;
220+
209221 // S3 working bucket
210222 const s3WorkingBucket = new s3 . Bucket ( this , 'WorkingBucket' , {
211223 blockPublicAccess : s3 . BlockPublicAccess . BLOCK_ALL ,
Original file line number Diff line number Diff line change 11{
2- "app" : " pnpx ts-node src/index.ts"
3- }
2+ "app" : " pnpx ts-node src/index.ts" ,
3+ "context" : {
4+ "@aws-cdk/core:newStyleStackSynthesis" : false
5+ }
6+ }
You can’t perform that action at this time.
0 commit comments