Open jxn opened 1 year ago
Hi @jxn - thanks for reaching out and for your patience. I brought this up with the team for discussion and I'm going to mark it as feature-request as we agreed this's a valid ask. Though I can't promise where this will land on their radar but I'll make sure to check in with them and keep it posted here.
I would also encourage others who's interested in this feature to upvote 👍🏽 the original post as it may help this move forward.
Totally agree with OP. Please prioritize.
Describe the bug
When using --output json or AWS_DEFAULT_OUTPUT=json with
aws cloudformation deploy
command, human-readable text is still produced as output.Outputs:
Expected Behavior
Some kind of stable json object would be produced, returning the change-set-name, e.g.
Current Behavior
Reproduction Steps
Possible Solution
Return json and only json if requested by the user using --output json
Additional Information/Context
It's important to provide json output for programmatic use. Perhaps
cloudformation deploy
is not intended for programmatic use, but it's difficult to achieve the same result as cloudformation deploy with other cli commands if you want to programmatically execute cloudformation with the option to preview and approve the changeset in the process, while executing everything in a nonidempotent way.This is because
create-change-set
command only creates a changeset it an existing stack exists, andcreate-stack
andupdate-stack
require knowledge of whether the stack already exists.Previewing a changeset in automation for a stack of unknown status thus requires
whereas, running the same procedure with cloudformation deploy:
cloudformation deploy
with --no-execute-changesetCLI version used
aws-cli/2.13.27 Python/3.11.6
Environment details (OS name and version, etc.)
ubuntu linux 22.04 and ubuntu linux 23.04