Allow cloudformation deploy to accept a paramater file
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
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().
Marking as a feature request for cloudformation deploy.
@sanathkr thoughts?
waiting for this feature π
I would also like the feature for package actions. Thanks! π
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.
+1 for this feature. Thanks!
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
+1 for this feature. Thanks!
Based on community feedback, we have decided to return feature requests to GitHub issues.
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.
I'm going to +1 this feature too.
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
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.
+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.
π on the feature request, would be great if this was supported.
This would be a great feature to have! It would greatly simplify Idempotency when creating cf stacks with the cli π
+1
+1
+1
@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...)