-
Notifications
You must be signed in to change notification settings - Fork 4k
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
PipelineCreateReplaceChangeSetAction does not allow for multiple input artifacts #1247
PipelineCreateReplaceChangeSetAction does not allow for multiple input artifacts #1247
Comments
Hey Chris, thanks for opening the issue. What's the behavior when specifying multiple input artifacts? Is the extra input used to specify parameter overrides? Or something else perhaps? Thanks, |
Hey @skinny85 no problem, thanks for the quick reply. Currently I have a mono repo and each sub project I want to be able to deploy to it's own stack so that I can reduce the number of dependencies that are shipped for each project. My pipeline currently looks like source => build => (Update Step) Update Step has Stack1ChangeSet and Stack2ChangeSet each one get's built with a specific parameter template pointing to each specific build output from the build step. Does that all make sense? |
That's good, because that use case is actually supported :). You would do something like this: new cloudformation. PipelineCreateReplaceChangeSetAction(this, 'Stack1CreateChangeSetAction', {
stackName: 'YourStack',
changeSetName: 'YourChangeSet',
templatePath: buildAction.outputArtifact.atPath('path/to/your/template.yml'),
templateConfiguration: buildAction.outputArtifact.atPath('path/to/your/overrides/file.json'),
}); And similarly for Let me know if this solves your use case! |
Yeah that is what I am already doing, however the change set depends on two build artifacts because I have 1 called infrastructure which is where the templatePath / template configuration. But those templates / config point to my other build artifact called website. |
Sorry, I'm not following. Can you show me your code? |
After talking with @skinny85 offline we have figured out that it is better to expose the PipelineCreateReplaceChangeSetAction to only include one input artifact and instead if we need resources from other build artifacts for cloud formation parameters we can just include those in our buildspec |
Hey, coming back around I ran into another use case where I need this feature. In actual cloud formation this is possible |
@skinny85 are you picking this up? |
@seawatts can you explain how are the extra input artifacts used in CloudFormation Actions? What do they do? |
OK, I understand how are the extra input artifacts used in CloudFormation Actions now. I'm working on fixing this. |
PR with the fix: #2020 |
…ctions (#2020) Additional input Artifacts are needed when using the `parameterOverrides` property of the Action (any Artifact used in that map needs to be added to the input Artifacts of the Action, otherwise the Pipeline will fail at runtime). Also did some cleanup in the Action superclass while I was in the area. Fixes #1247
…ctions (aws#2020) Additional input Artifacts are needed when using the `parameterOverrides` property of the Action (any Artifact used in that map needs to be added to the input Artifacts of the Action, otherwise the Pipeline will fail at runtime). Also did some cleanup in the Action superclass while I was in the area. Fixes aws#1247
From the AWS Pipeline console you can configure a change set action to have multiple input artifacts however, it is not exposed in the CDK. Under the hood it looks like the CDK implements a function called
addInputArtifact
however, it is a protected function.The text was updated successfully, but these errors were encountered: