Skip to content

Commit

Permalink
Add a resolve to ArtifactPath (#571)
Browse files Browse the repository at this point in the history
* Add a resolve to ArtifactPath

When using artifact path for template configuration, the CDK would get upset.
This just adds a resolve that falls back to that location.

Fixes #570

* Resolve location at l2 time
  • Loading branch information
mindstorms6 committed Aug 15, 2018
1 parent fbbe913 commit f0e7bb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export abstract class CloudFormationDeploymentAction extends CloudFormationActio
Capabilities: (capabilities && capabilities.join(',')) || undefined,
RoleArn: new cdk.Token(() => this.role.roleArn),
ParameterOverrides: props.parameterOverrides,
TemplateConfiguration: props.templateConfiguration,
TemplateConfiguration: props.templateConfiguration ? props.templateConfiguration.location : undefined,
StackName: props.stackName,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export = {
changeSetName,
role: changeSetExecRole,
templatePath: new ArtifactPath(buildAction.artifact!, 'template.yaml'),
templateConfiguration: new ArtifactPath(buildAction.artifact!, 'templateConfig.json')
});

new ExecuteChangeSet(stack, 'ExecuteChangeSetProd', {
Expand Down Expand Up @@ -160,7 +161,8 @@ export = {
]
},
"StackName": "BrelandsStack",
"TemplatePath": "OutputYo::template.yaml"
"TemplatePath": "OutputYo::template.yaml",
"TemplateConfiguration": "OutputYo::templateConfig.json"
},
"InputArtifacts": [{"Name": "OutputYo"}],
"Name": "BuildChangeSetProd",
Expand Down

0 comments on commit f0e7bb5

Please sign in to comment.