aws / aws/aws-cli

aws cloudformation deploy: multiple --parameter-overrides

Open
#6,884 1 comment 2 reactions 0 assignees View on GitHub
cloudformation package-deploy customization feature-request p3
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

### Describe the feature

Hi!

I would like to specify some parameters via a file and some explicitly. At the moment I can do either or but not both.

Current behaviour:

aws cloudformation deploy --parameter-overrides file:///tmp/ruwen.json --parameter-overrides Foo=Bar

results in file:///tmp/ruwen.json being silently ignored.

What I want is that first the parameters of the file are evaluated and then merged with Foo=Bar. The later overwrites the former in case they specify the same parameter.

### Use Case

I got some parameters generated by a program, other ones I get from the meta-data of my build pipeline. So I would like to join this data.

### Proposed Solution

There are two options:

Option 1 - multiple --parameter-overrides
aws cloudformation deploy --parameter-overrides file:///tmp/ruwen.json --parameter-overrides Foo=Bar
Each specification is evaluated and potentially overwrites the previous specified parameters.

While it is simple to implement, it breaks the current behaviour. At the moment the last specification of --parameter-overrides wins. That would no longer be the case.

I am happy to submit a PR for this option.

Option 2 - allow mixed formats
aws cloudformation deploy --parameter-overrides file:///tmp/ruwen.json Foo=Bar
This would be a bit more complicated to implement. Currently the parser rejects this format, that would make the parser no longer reject this.

### Other Information

Something similar has been requested for the create-stack operation at https://github.com/aws/aws-cli/issues/3251

### Acknowledgements

- [X] I may be able to implement this feature request
- [X] This feature might incur a breaking change

### CLI version used

v2

### Environment details (OS name and version, etc.)

linux

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.