AWS CDK Toolkit Library - Developer Preview #154
Replies: 5 comments 13 replies
-
Just wanted to say that I am really excited about this release. I have just finished migrating our integration test harness from I have opened two issues related to improvement I think could benefit the toolkit:
other than that, great work 👏 |
Beta Was this translation helpful? Give feedback.
-
Hi, decided to try this tool. We have two accounts in two regions, one for prod and one for stage. Previously we used CDK_DEFAULT_REGION and CDK_DEFAULT_ACCOUNT to use in our stacks. How to get this values in toolkit? |
Beta Was this translation helpful? Give feedback.
-
thank you for creating this :) |
Beta Was this translation helpful? Give feedback.
-
@mrgrain there is a typo in this source code https://docs.aws.amazon.com/cdk/api/toolkit-lib/#how-to-handle-errors The variable passed to |
Beta Was this translation helpful? Give feedback.
-
@mrgrain, this is one of the best things you could have ever done about the CDK because it adds so much more programmaticability around all processes 🙏🏻 I suppose this is not yet a bug, but it is more of a possible optimization. When running the The CDK CLI uses its formatter to calculate the diff, but other programmatic implementations can benefit from this precalculated info. At https://github.com/aws/aws-cdk-cli/blob/52457cfc25dce58e8b3d1da8ff20c87cfd336034/packages/%40aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts#L368C1-L371C8 we have the diff span end, which contains the formatted diff, but could also include the number of stacks with diffs. To figure out the number of stacks with diffs, you'd have to parse the log span message or re-do the whole calculation yourself. I think we can benefit from:
And one additional note, just reading the code at , looks like there is an overwriting of thediffs var. Whether it's expected because of how the whole flow works, it seems odd inside this for cycle. Maybe a bug, maybe expected, reporting just in case.
Diff log:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The AWS Cloud Development Kit (AWS CDK) Toolkit Library enables you to perform CDK actions requiring programmatic access on AWS. You can use the AWS CDK Toolkit Library to implement actions such as bootstrapping, synthesizing, and deploying through code rather than command-line interface (CLI) commands. With this library, you can create custom tools, build specialized CLI applications, and integrate CDK programmatic access capabilities into your development workflows
📜 Reference documentation: https://docs.aws.amazon.com/cdk/api/toolkit-lib/
📦 npm package: https://www.npmjs.com/package/@aws-cdk/toolkit-lib
We are excited to launch the CDK Toolkit Library in Developer Preview. We want to hear from you and appreciate all feedback!
Please use this discussion for 🗣️ general feedback, 💡 ideas and 🆕 feature requests
🐛 For bug reports, please create a new issue
Beta Was this translation helpful? Give feedback.
All reactions