-
Notifications
You must be signed in to change notification settings - Fork 457
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
App.synth output - returning as JSON/String in code #408
Comments
I'm curious how you plan on using the synthesized output. Are you looking for something like #237 ? |
I'm looking to be able to do things like Unit testing and potentially doc generation automation. |
I'm also looking for a good way of unit testing the CDK in Java. CloudAssembly assembly = app.synth(); Now, I have a tree.json file to check. But it doesn't seem to be the right way, though |
It does look like AWS CDK has a couple pieces that don't exist in cdktf. Seems reasonable to explore similar patterns. |
There are some basic testing capabilities - see here for an example: https://github.com/hashicorp/terraform-cdk/blob/fc3363e575f14d43aacd5512b608105e4216536c/packages/cdktf/test/provider.test.ts @lukepopp what are you looking for beyond that? Some helpers around matching particular parts of resources / attributes? |
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Community Note
Description
Hi
I'm trying to trap the output of App.synth() in Java. Unfortunately the synth method returns void so I can't get this easily in code. I can use the Builder to specify an output directory and read the output from that but was looking for a better way . The AWS CDK has options to get the JSON Tree in code. Thanks.
References
The text was updated successfully, but these errors were encountered: