Skip to content

Commit

Permalink
fix(pipelines): Prepare stage doesn't have AUTO_EXPAND capability (aw…
Browse files Browse the repository at this point in the history
…s#15819)

Fixes aws#15711.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
otaviomacedo authored and TikiTDO committed Aug 3, 2021
1 parent bd98128 commit f1c5da0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
3 changes: 2 additions & 1 deletion packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as cp from '@aws-cdk/aws-codepipeline';
import * as cpa from '@aws-cdk/aws-codepipeline-actions';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as iam from '@aws-cdk/aws-iam';
import { Aws, Fn, Lazy, PhysicalName, Stack } from '@aws-cdk/core';
import { Aws, CfnCapabilities, Fn, Lazy, PhysicalName, Stack } from '@aws-cdk/core';
import * as cxapi from '@aws-cdk/cx-api';
import { Construct, Node } from 'constructs';
import { AssetType, FileSet, IFileSetProducer, ManualApprovalStep, ShellStep, StackAsset, StackDeployment, Step } from '../blueprint';
Expand Down Expand Up @@ -536,6 +536,7 @@ export class CodePipeline extends PipelineBase {
templateConfiguration: templateConfigurationPath
? templateArtifact.atPath(toPosixPath(templateConfigurationPath))
: undefined,
cfnCapabilities: [CfnCapabilities.NAMED_IAM, CfnCapabilities.AUTO_EXPAND],
}));
return { runOrdersConsumed: 1 };
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@
},
"Configuration": {
"StackName": "Beta-Stack1",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down
28 changes: 14 additions & 14 deletions packages/@aws-cdk/pipelines/test/integ.newpipeline.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
},
"Configuration": {
"StackName": "Beta-Stack1",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -426,7 +426,7 @@
},
"Configuration": {
"StackName": "Beta-Stack2",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -537,7 +537,7 @@
},
"Configuration": {
"StackName": "Prod1-Stack1",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -605,7 +605,7 @@
},
"Configuration": {
"StackName": "Prod2-Stack1",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -749,7 +749,7 @@
},
"Configuration": {
"StackName": "Prod1-Stack2",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -817,7 +817,7 @@
},
"Configuration": {
"StackName": "Prod2-Stack2",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -966,7 +966,7 @@
},
"Configuration": {
"StackName": "Prod3-Stack1",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -1034,7 +1034,7 @@
},
"Configuration": {
"StackName": "Prod4-Stack1",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -1102,7 +1102,7 @@
},
"Configuration": {
"StackName": "Prod5-Stack1",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -1170,7 +1170,7 @@
},
"Configuration": {
"StackName": "Prod6-Stack1",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -1390,7 +1390,7 @@
},
"Configuration": {
"StackName": "Prod3-Stack2",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -1458,7 +1458,7 @@
},
"Configuration": {
"StackName": "Prod4-Stack2",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -1526,7 +1526,7 @@
},
"Configuration": {
"StackName": "Prod5-Stack2",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -1594,7 +1594,7 @@
},
"Configuration": {
"StackName": "Prod6-Stack2",
"Capabilities": "CAPABILITY_NAMED_IAM",
"Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND",
"RoleArn": {
"Fn::Join": [
"",
Expand Down

0 comments on commit f1c5da0

Please sign in to comment.