-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
We don’t have plans to output YAML to cdk.out
The cdk.out directory is a build artifact and generally intended to be read by machines and not by humans. As such we want to make sure it’s contents are deterministic and consistent and YAML is less stable then JSON (there are quirks related to yaml version, parsing, multi-line, etc).
Any yaml parser should be able to read json out of the box because YAML is designed as a superset of json (all json is valid yaml).
If you need to convert json to human readable yaml, there are many many tools you could use.
Original post
Describe the bug
cdk synth ignores -j option when used with -o. It will always produce json files even if -j is false or not present. As a result, it is not possible to synthesize yaml files in a given directory.
To Reproduce
cdk synth -o stacks
cdk synth -j false -o stacks
Expected behavior
There should be yaml files in the stacks dir.
Version:
- OS MacOS
- CDK Version 0.34.0