Skip to content

Commit d251a46

Browse files
skinny85RomainMuller
authored andcommitted
feat(aws-cloudformation): correctly handle the templateConfiguration property in the CreateUpdateStack Pipeline Action. (#923)
1 parent 841975a commit d251a46

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/@aws-cdk/aws-cloudformation/lib/pipeline-actions.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ export interface PipelineCloudFormationDeployActionProps extends PipelineCloudFo
108108
* IAM role to assume when deploying changes.
109109
*
110110
* If not specified, a fresh role is created. The role is created with zero
111-
* permissions unless `trustTemplate` is true, in which case the role will have
111+
* permissions unless `fullPermissions` is true, in which case the role will have
112112
* full permissions.
113113
*
114-
* @default A fresh role with full or no permissions (depending on the value of `trustTemplate`).
114+
* @default A fresh role with full or no permissions (depending on the value of `fullPermissions`).
115115
*/
116116
role?: iam.Role;
117117

@@ -123,7 +123,7 @@ export interface PipelineCloudFormationDeployActionProps extends PipelineCloudFo
123123
* stack template contains AWS Identity and Access Management (IAM) resources. For more
124124
* information, see [Acknowledging IAM Resources in AWS CloudFormation Templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities).
125125
*
126-
* @default No capabitilities passed, unless `trustTemplate` is true
126+
* @default No capabitilities passed, unless `fullPermissions` is true
127127
*/
128128
capabilities?: CloudFormationCapabilities[];
129129

@@ -319,7 +319,11 @@ export class PipelineCreateUpdateStackAction extends PipelineCloudFormationDeplo
319319
ActionMode: props.replaceOnFailure ? 'REPLACE_ON_FAILURE' : 'CREATE_UPDATE',
320320
TemplatePath: props.templatePath.location
321321
});
322+
322323
this.addInputArtifact(props.templatePath.artifact);
324+
if (props.templateConfiguration && props.templateConfiguration.artifact.name !== props.templatePath.artifact.name) {
325+
this.addInputArtifact(props.templateConfiguration.artifact);
326+
}
323327

324328
// permissions are based on best-guess from
325329
// https://docs.aws.amazon.com/codepipeline/latest/userguide/how-to-custom-role.html

0 commit comments

Comments
 (0)