Skip to content

Commit 144b1b9

Browse files
authored
feat(codepipeline): change default value for crossAccountKeys to false (under feature flag) (#28556)
[The documentation](https://github.com/aws/aws-cdk/blob/f4c1d1253ee34c2837a57a93faa47c9da97ef6d8/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts#L380-L381) mentions updating the default for CDK v2. Sounds like we should add it in with feature flag. Closes #28247. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 1931987 commit 144b1b9

28 files changed

+153
-12
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const prodStage = {
5252
};
5353

5454
new codepipeline.Pipeline(stack, 'Pipeline', {
55+
crossAccountKeys: true,
5556
stages: [
5657
sourceStage,
5758
prodStage,

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ new lambda.Function(lambdaStack, 'Lambda', {
2020
// other resources that your Lambda needs, added to the lambdaStack...
2121

2222
const pipelineStack = new cdk.Stack(app, 'PipelineStack');
23-
const pipeline = new codepipeline.Pipeline(pipelineStack, 'Pipeline');
23+
const pipeline = new codepipeline.Pipeline(pipelineStack, 'Pipeline', {
24+
crossAccountKeys: true,
25+
});
2426

2527
// add the source code repository containing this code to your Pipeline,
2628
// and the source code of the Lambda Function, if they're separate

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ const app = new cdk.App();
1010

1111
const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-lambda');
1212

13-
const pipeline = new codepipeline.Pipeline(stack, 'Pipeline');
13+
const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', {
14+
crossAccountKeys: true,
15+
});
1416

1517
const sourceStage = pipeline.addStage({ stageName: 'Source' });
1618
const bucket = new s3.Bucket(stack, 'PipelineBucket', {

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const deployStage = {
3939
};
4040

4141
new codepipeline.Pipeline(stack, 'Pipeline', {
42+
crossAccountKeys: true,
4243
stages: [
4344
sourceStage,
4445
deployStage,

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ const app = new cdk.App();
88

99
const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation');
1010

11-
const pipeline = new codepipeline.Pipeline(stack, 'Pipeline');
11+
const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', {
12+
crossAccountKeys: true,
13+
});
1214

1315
const bucket = new s3.Bucket(stack, 'PipelineBucket', {
1416
versioned: true,

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const testAction = new cpactions.CodeBuildAction({
4747
});
4848

4949
new codepipeline.Pipeline(stack, 'Pipeline', {
50+
crossAccountKeys: true,
5051
stages: [
5152
{
5253
stageName: 'source',

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-custom-event.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const eventPattern
3232

3333
const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', {
3434
pipelineName: 'IntegCustomEventPipeline',
35+
crossAccountKeys: true,
3536
stages: [
3637
{
3738
stageName: 'source',

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const repo = new codecommit.Repository(stack, 'MyRepo', {
1515
});
1616

1717
new codepipeline.Pipeline(stack, 'Pipeline', {
18+
crossAccountKeys: true,
1819
stages: [
1920
{
2021
stageName: 'source',

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const repo = new codecommit.Repository(stack, 'MyRepo', {
1616
});
1717

1818
new codepipeline.Pipeline(stack, 'Pipeline', {
19+
crossAccountKeys: true,
1920
stages: [
2021
{
2122
stageName: 'source',

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ const app = new cdk.App();
1313

1414
const stack = new cdk.Stack(app, 'aws-cdk-pipeline-event-target');
1515

16-
const pipeline = new codepipeline.Pipeline(stack, 'MyPipeline');
16+
const pipeline = new codepipeline.Pipeline(stack, 'MyPipeline', {
17+
crossAccountKeys: true,
18+
});
1719

1820
const repository = new codecommit.Repository(stack, 'CodeCommitRepo', {
1921
repositoryName: 'foo',

0 commit comments

Comments
 (0)