Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support in parameter files in --parameter-overrides #3445

Closed
digitalfiz opened this issue Jul 12, 2018 · 8 comments
Closed

Support in parameter files in --parameter-overrides #3445

digitalfiz opened this issue Jul 12, 2018 · 8 comments
Assignees
Labels
cloudformation package-deploy customization Issues related to CLI customizations (located in /awscli/customizations) feature-request A feature should be added or improved.

Comments

@digitalfiz
Copy link

As requested by @sanathkr over a year ago in aws/serverless-application-model#111 I am submitted a request to support parameter files in the --parameter-overrides flag.

Sorry I never got any notifications for some reason...

@justnance
Copy link

justnance commented Jul 21, 2018

@digitalfiz, Thank you for following up. We are investigating this request and so far it appears to be a reasonable feature request and have changed the label as such. Thanks.

cc: @sanathkr

@justnance justnance self-assigned this Jul 21, 2018
@justnance justnance added feature-request A feature should be added or improved. cloudformation package-deploy labels Jul 21, 2018
@atkretsch
Copy link

Don't know if this should be a separate feature request, but it would be great if --parameter-overrides supported YAML-formatted files.

@linusguan
Copy link

This feature would be awesome, we are still hacking it using a file with key=value

@adamfortuno
Copy link

It's Agree. Feature would be helpful.

@anabadce
Copy link

This is how I solved this for now:

STACK=myStack
TEMPLATE=stack.yaml
PARAMETERS=config1.json

PROPERTIES=$(jq -r '.[] | "\(.ParameterKey)=\(.ParameterValue)"' ./$PARAMETERS)

aws cloudformation deploy \
--stack-name $STACK \
--template-file "./$TEMPLATE" \
--parameter-overrides $(echo $PROPERTIES)
  • Using jq to easy convert from json to key=value
  • Config file is json because that is what aws cloudformation create-change-set uses for example
  • Config looks like this:
[
  {
    "ParameterKey": "Environment",
    "ParameterValue": "dev"
  }
]

@kdaily kdaily added the customization Issues related to CLI customizations (located in /awscli/customizations) label Nov 12, 2020
@kenlju
Copy link

kenlju commented Mar 17, 2021

We had some problem when one of the parameter values contained a cron expression cron(0 * * * ? *). Then the shell would expand the * to the filenames in the directory.

bash-3.2$ ls 
testfile
bash-3.2$ CR="cron(0 * * * ? *)"
bash-3.2$ echo $CR
cron(0 testfile testfile testfile ? *)
bash-3.2$ echo "$CR"
cron(0 * * * ? *)

@tim-finnigan
Copy link
Contributor

In CLI v2 there is documented support for using a JSON file with --parameter-overrides: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/deploy/index.html#examples

But there is another open feature request to use a parameter file in YAML format (as @atkretsch requested in this comment): #5473

Closing this issue as the JSON file option is available. Please refer to #5473 for updates on the request for YAML file support.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloudformation package-deploy customization Issues related to CLI customizations (located in /awscli/customizations) feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

9 participants