1 個回答
- 最新
- 最多得票
- 最多評論
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": {...} }
已回答 2 年前
相關內容
- 已提問 1 年前
- 已提問 1 年前
- 已提問 6 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前