Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a resolve to ArtifactPath #571

Merged
merged 2 commits into from
Aug 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is templateConfiguration always supposed to be an artifact path? Why not just change it's type to ArtifactPath and dereference .location in the L2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I'm aware - yes. Will try that instead.

However and maybe I'm being silly - would we ever not want to do this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean implement resolve - ideally no... It's a cheap trick that we are trying to avoid at the L2 surface area

});

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