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

[Feature Request] Enable deploy parameters to be passed in via JSON, like the aws cli #1938

Closed
rupe120 opened this issue Apr 24, 2020 · 10 comments
Labels

Comments

@rupe120
Copy link

rupe120 commented Apr 24, 2020

Describe your idea/feature/enhancement

When performing a aws cloudformation create-stack the --parameters option can be passed a JSON file

https://docs.aws.amazon.com/cli/latest/reference/cloudformation/create-stack.html

Please enable this functionality for sam deploy

Proposal

If a JSON file refrence is passed like so sam deploy --parameter-overrides <file path>, attempt to read the parameters from the file. The file should follow the same spec as in the aws cli

Additional Details

This would make certain code deployment integrations much easier, being able to refrence a single parameters file from different scripts.

@rupe120 rupe120 changed the title [Feature Request] Enable deploy parameters to be passed in via json like the aws cli [Feature Request] Enable deploy parameters to be passed in via JSON, like the aws cli Apr 24, 2020
@sriram-mv sriram-mv added the type/feature Feature request label Apr 27, 2020
@awood45
Copy link
Member

awood45 commented Jul 24, 2020

We would happily accept a PR for this, otherwise it's on our list of UX issues to fix.

@mgrandis
Copy link
Contributor

mgrandis commented Feb 4, 2021

@rupe120
It seems this feature was added to 1.3.2: https://github.com/aws/aws-sam-cli/releases/tag/v1.3.2
Does it solve your issue?

@rupe120
Copy link
Author

rupe120 commented Feb 5, 2021

@mgrandis
Not quite. If I'm reading the change correctly it pulls the parameters from the toml file.

What I was looking for was the JSON format file import that is supported by CloudFormation. The intention is that JSON is a more accessible format for manipulation in automation. For instance, I can use the JSON format with the jq bash command

@mokele
Copy link

mokele commented Feb 5, 2021

@rupe120 I knocked this up a little while ago to address my need for the same https://github.com/mokele/template-configuration

@rupe120
Copy link
Author

rupe120 commented Feb 5, 2021

@mokele
There are too many tools to juggle. We are currently using just SAM and AWS cli in our pipeline. I do appreciate the desire to streamline the process, but the added complexity in that solution is less desirable for me than the consolidation of configuration

@mgrandis
Copy link
Contributor

mgrandis commented Feb 5, 2021

I should have been more specific sorry!
I was talking about the --parameter-overrides parameter, it is however not in JSON format:

Optional. A string that contains AWS CloudFormation parameter overrides encoded as key=value pairs." "For example, 'ParameterKey=KeyPairName,ParameterValue=MyKey ParameterKey=InstanceType," "ParameterValue=t1.micro' or KeyPairName=MyKey InstanceType=t1.micro

@mgrandis mgrandis added the contributors/welcome Contributors are welcome to work on this label Feb 5, 2021
@rupe120
Copy link
Author

rupe120 commented Feb 8, 2021

@mokele I understood what you were saying, which is why I re-highlighted the JSON format that was the primary focus of my proposal

@bartoszWesolowski
Copy link

hello, do you plan to implement this in close future? Our team is planning to use SAM and it would be great to get this feature in our pipelines :)

@mndeveci
Copy link
Contributor

Duplicate #2054

@mndeveci mndeveci closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2023
@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants