(aws-cdk cli): Add option to deploy as JSON instead of YAML
I would like some way to be able to deploy stacks to AWS in JSON format instead of YAML.
There is the option to "synth" stacks locally as JSON by providing the --json flag, but the deployment flow seems to force conversion to YAML.
Use Case
I want to be able to deploy CF stacks in JSON format instead of YAML. This is to allow support engineers (24x7 operations teams) to be able to administer our application including CloudFormation parameters using an in-house tool.
This tool only supports stacks which were deployed in JSON format.
Proposed Solution
The deployment process should be adapted so that assets can be optionally preserved in JSON format.
This should be a small adaptation to aws-cdk/packages/aws-cdk/lib/api/deploy-stack.ts > makeBodyParameter as the template appears to start as JSON before being converted to YAML
https://github.com/aws/aws-cdk/blob/aa9fd9cd9bbaea4149927e08d57d29e547933f49/packages/aws-cdk/lib/api/deploy-stack.ts#L338
A flag similar to the "--json" flag (from the cdk synth command) could be added to the "deploy" command, or better still a config parameter that can be added to cdk.json file could be possible solutions for configuring this.
Deployment of the template file directly to CloudFormation as well as to S3 should obey this configuration option.
Other
- [ ] :wave: I may be able to implement this feature request
- [ ] :warning: This feature might incur a breaking change
This is a :rocket: Feature Request
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.