@@ -220,6 +220,9 @@ export class AcceleratorPipeline extends Construct {
220
220
let pipelineName = `${ props . prefixes . accelerator } -Pipeline` ;
221
221
let buildProjectName = `${ props . prefixes . accelerator } -BuildProject` ;
222
222
let toolkitProjectName = `${ props . prefixes . accelerator } -ToolkitProject` ;
223
+ this . diffS3Uri = `s3://${ this . props . prefixes . bucketName } -pipeline-${ cdk . Stack . of ( this ) . account } -${
224
+ cdk . Stack . of ( this ) . region
225
+ } /AWSAccelerator-Pipel/Diffs`;
223
226
224
227
//
225
228
// Change the fields when qualifier is present
@@ -233,6 +236,11 @@ export class AcceleratorPipeline extends Construct {
233
236
pipelineName = `${ this . props . qualifier } -pipeline` ;
234
237
buildProjectName = `${ this . props . qualifier } -build-project` ;
235
238
toolkitProjectName = `${ this . props . qualifier } -toolkit-project` ;
239
+ // External deployment conditions used throughout pipeline use management account id and role name
240
+ // Pipeline bucket is created using qualifier and NOT this.props.prefix.
241
+ this . diffS3Uri = `s3://${ this . props . qualifier } -pipeline-${ cdk . Stack . of ( this ) . account } -${
242
+ cdk . Stack . of ( this ) . region
243
+ } /AWSAccelerator-Pipel/Diffs`;
236
244
}
237
245
238
246
let nodeEnvVariables : { [ p : string ] : codebuild . BuildEnvironmentVariable } | undefined ;
@@ -581,14 +589,11 @@ export class AcceleratorPipeline extends Construct {
581
589
} ) ;
582
590
583
591
/**
584
- * Toolkit CodeBuild poroject is used to run all Accelerator stages, including diff
592
+ * Toolkit CodeBuild project is used to run all Accelerator stages, including diff
585
593
* First it executes synth of all Pipeline stages and then diff within the same container.
586
594
* CloudFormation templates are then reused for all further stages
587
- * Diff files are uploaded to pipeline S3 bucket
595
+ * Diff files are uploaded to pipeline S3 bucket - consideration needed if running in external account
588
596
*/
589
- this . diffS3Uri = `s3://${ this . props . prefixes . bucketName } -pipeline-${ cdk . Stack . of ( this ) . account } -${
590
- cdk . Stack . of ( this ) . region
591
- } /AWSAccelerator-Pipel/Diffs`;
592
597
593
598
this . toolkitProject = new codebuild . PipelineProject ( this , 'ToolkitProject' , {
594
599
projectName : toolkitProjectName ,
0 commit comments