aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

Allow cloudformation deploy to accept a paramater file

Open akashisama opened this issue 9 years ago β€’ 55 comments

When running the cloudformation deploy command it would be useful to be able to pass the parameters in as a file (to the --parameter-override parameter), as can be done with create-stack and update-stack.

Also requested here: https://github.com/awslabs/serverless-application-model/issues/111

akashisama avatar Sep 13 '17 03:09 akashisama

Looking over the code it seems we'd just need something around here

https://github.com/aws/aws-cli/blob/develop/awscli/customizations/cloudformation/deploy.py#L178

that reads in a JSON file, maybe a quick sanity check, then passes it along to deploy().

cwgem avatar Sep 13 '17 19:09 cwgem

Marking as a feature request for cloudformation deploy.

@sanathkr thoughts?

stealthycoin avatar Sep 13 '17 19:09 stealthycoin

waiting for this feature πŸ‘

philipakash avatar Oct 07 '17 17:10 philipakash

I would also like the feature for package actions. Thanks! πŸ‘

larryboymi avatar Dec 01 '17 19:12 larryboymi

Passing a parameters file via something like --parameters as in the create-stack and update-stack CF commands (and ideally using the same file contents syntax) would make developing CF templates a tad easier for me. Would love to see that feature.

dumrauf avatar Dec 22 '17 16:12 dumrauf

+1 for this feature. Thanks!

anthonynovatsis avatar Jan 03 '18 10:01 anthonynovatsis

Good Morning!

We're closing this issue here on GitHub, as part of our migration to UserVoice for feature requests involving the AWS CLI.

This will let us get the most important features to you, by making it easier to search for and show support for the features you care the most about, without diluting the conversation with bug reports.

As a quick UserVoice primer (if not already familiar): after an idea is posted, people can vote on the ideas, and the product team will be responding directly to the most popular suggestions.

We’ve imported existing feature requests from GitHub - Search for this issue there!

And don't worry, this issue will still exist on GitHub for posterity's sake. As it’s a text-only import of the original post into UserVoice, we’ll still be keeping in mind the comments and discussion that already exist here on the GitHub issue.

GitHub will remain the channel for reporting bugs.

Once again, this issue can now be found by searching for the title on: https://aws.uservoice.com/forums/598381-aws-command-line-interface

-The AWS SDKs & Tools Team

This entry can specifically be found on UserVoice at: https://aws.uservoice.com/forums/598381-aws-command-line-interface/suggestions/33168409-allow-cloudformation-deploy-to-accept-a-paramater

ASayre avatar Feb 06 '18 10:02 ASayre

+1 for this feature. Thanks!

ghost avatar Mar 26 '18 02:03 ghost

Based on community feedback, we have decided to return feature requests to GitHub issues.

jamesls avatar Apr 06 '18 20:04 jamesls

In case anyone is looking for a workaround, you can try using jq, like so: aws cloudformation deploy --parameter-overrides $(jq -r '.[] | [.ParameterKey, .ParameterValue] | join("=")' param.json) ... Further escaping may be necessary based on your parameter values.

foobert avatar Apr 10 '18 12:04 foobert

I'm going to +1 this feature too.

holmesjr avatar May 29 '18 06:05 holmesjr

I'm replacing jq with jp wherever possible. JMESPath is worth learning.

$ jp \
  --unquoted \
  --filename example-app-params-staging.json  \
  "join(' ', @[].join('=', [ParameterKey, ParameterValue])[])"
HostedZone=example.com KeyName=example-ap-southeast-2 TargetPort=8080 VpcStackName=vpc-example

mbailey avatar May 29 '18 11:05 mbailey

Given AWS CodePipeline CloudFormation deployment action requires a specific template configuration file format, it would be good if you could also support this format as well.

mixja avatar Jun 03 '18 09:06 mixja

+1 for this. I understand wanting to keep "aws cloudformation deploy" simple, but this command already has individual command line flags for capabilities, tags, and parameters (like all other aws cloudformation commands), but you've made them function differently (only accepting list of string=string on the command line, rather than a JSON structure in a file). You should make all "aws cloudformation" commands work consistently (including use of cli-input-json like almost all aws CLI commands). if you wanted a simplification of the tags construct for "aws cloudformation deploy", you should introduce a different command line flag, like --tags-overrides or --parameters-overrides.

cervantek avatar Sep 06 '18 20:09 cervantek

πŸ‘ on the feature request, would be great if this was supported.

emilbryggare avatar Nov 04 '18 15:11 emilbryggare

This would be a great feature to have! It would greatly simplify Idempotency when creating cf stacks with the cli πŸ‘

pmartindev avatar Nov 19 '18 05:11 pmartindev

+1

mnwk avatar Nov 19 '18 13:11 mnwk

+1

dan-lind avatar Dec 06 '18 15:12 dan-lind

+1

ColdFire87 avatar Dec 21 '18 12:12 ColdFire87

@ColdFire87 @dan-lind @mnwk can you please just πŸ‘ the first issue, and stop spamming whoever is subscribed to this issue? Each comment with πŸ‘ is pinging 20 persons.... (Sorry for others, but we have to fight that...)

pierreozoux avatar Dec 21 '18 14:12 pierreozoux