-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use cdk-cli-lib to synthesize cdk app #153
Labels
Milestone
Comments
corymhall
added a commit
that referenced
this issue
Oct 1, 2024
Previously this library walked the construct tree in-memory and called the internal `_toCloudFormation()` method each `Cfn*` construct has to get the CloudFormation resource fragment. This is both inefficient (because we call `synth` which internally does the same thing, and then we do it again), and potentially inaccurate (`synth` internally does a lot more than we do when we walk the construct tree). This PR is a refactor (maybe closer to a rewrite) that switches to taking the output of `app.synth()` and processing the resulting CloudAssembly. The CloudAssembly has everything necessary to do the conversion and contains the fully resolved CloudFormation template (we don't have to worry about unresolved tokens!). This also sets us up for future work like nested stacks, multiple stacks, and #153. Note to reviewers. This is a pretty big refactor so I would recommend reviewing this instead as a restart rather than trying to figure out what the old code is doing. Closes #18
corymhall
added a commit
that referenced
this issue
Oct 7, 2024
Previously this library walked the construct tree in-memory and called the internal `_toCloudFormation()` method each `Cfn*` construct has to get the CloudFormation resource fragment. This is both inefficient (because we call `synth` which internally does the same thing, and then we do it again), and potentially inaccurate (`synth` internally does a lot more than we do when we walk the construct tree). This PR is a refactor (maybe closer to a rewrite) that switches to taking the output of `app.synth()` and processing the resulting CloudAssembly. The CloudAssembly has everything necessary to do the conversion and contains the fully resolved CloudFormation template (we don't have to worry about unresolved tokens!). This also sets us up for future work like nested stacks, multiple stacks, and #153. Note to reviewers. This is a pretty big refactor so I would recommend reviewing this instead as a restart rather than trying to figure out what the old code is doing. Closes #18
This was referenced Oct 29, 2024
This issue has been addressed in PR #170 and shipped in release v1.0.0. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Hello!
Issue details
CDK functionality is split between the
framework
and thecli
. Currentlypulumi-cdk
directly integrates with theframework
in order to synthesize and convert the resources. We should instead integrate with thecli
and allow the cli to synth. This would allow us to utilize the complete feature set of CDK.For example this would enable CDK lookups like Vpc.fromLookup(). When lookups are performed:
cdk.context.json
and if it is not there then it registers that a lookup needs to take placeWe should be able to use the new
@aws-cdk/cli-lib-alpha
library to register a CloudAssembly directory producer.Affected area/feature
The text was updated successfully, but these errors were encountered: