aws-sam-cli
aws-sam-cli copied to clipboard
[Feature Request] Enable deploy parameters to be passed in via JSON, like the aws cli
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.
We would happily accept a PR for this, otherwise it's on our list of UX issues to fix.
@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?
@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
@rupe120 I knocked this up a little while ago to address my need for the same https://github.com/mokele/template-configuration
@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
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
@mokele I understood what you were saying, which is why I re-highlighted the JSON format that was the primary focus of my proposal
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 :)
Duplicate https://github.com/aws/aws-sam-cli/issues/2054
⚠️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.