1 Answer
- Newest
- Most votes
- Most comments
1
You can directly provide the parameter values to the stack being deployed using the parameterOverrides
attribute (see the API documentation for details).
new CloudFormationCreateReplaceChangeSetAction({ actionName: 'PrepareChanges', stackName: 'my-stack', changeSetName: 'StagedChangeSet', adminPermissions: true, templatePath: sourceOutput.atPath('cloudformation/cf-test.yaml'), runOrder: 1, parameterOverrides: { 'AppDeployBucket' : 'your-value', 'DatabaseNamespace' : 'your-value' } });
In the example above, the parameter names and values are hard-coded.
If you want to specify the parameters using an artifact file, use templateConfiguration
instead (documentation link):
new CloudFormationCreateReplaceChangeSetAction({ actionName: 'PrepareChanges', stackName: 'my-stack', changeSetName: 'StagedChangeSet', adminPermissions: true, templatePath: sourceOutput.atPath('cloudformation/cf-test.yaml'), runOrder: 1, templateConfiguration: sourceOutput.atPath('parameter-file.json'), });
The template configuration file should contain a JSON object that should look like this:
{ "Parameters": {...}, "Tags": {...}, "StackPolicy": {...} }
answered 2 years ago
Relevant content
- asked 9 months ago
- asked 7 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago