How to get CDK version used to deploy a stack? #20591
-
Hello, I have received an AWS notification telling me:
which surprised me, I thought all the stacks were migrated to 2.x already. Unfortunately, it does not tell me which ones are still on version 1, or any way to get them. How can I find the stacks still deployed with version 1? I could not find anything relevant in AWS console or playing with cdk cli. Thank! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Indeed, am having the same question. In our cloudformation templates I find something like this:
In the documentation there is written about the analytics property: AWS CDK core module And indeed :
In the cdk workshop there is CDKMetadata of an older version: CDKMetadata:
Apparently in CDKv2 there is no Modules: property anymore. So based on the assumption that version-reporting was enabled would it work to retreive al cfn templates and check if there is CDKMetadata.Modules property to determine a CDK v1 cloudformation stack? |
Beta Was this translation helpful? Give feedback.
-
We've sent out a notification more recently for affected stacks since this discussion has been active - but you can identify stacks with this tool if anyone is still interested https://github.com/cdklabs/awscdk-v1-stack-finder |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
We've sent out a notification more recently for affected stacks since this discussion has been active - but you can identify stacks with this tool if anyone is still interested https://github.com/cdklabs/awscdk-v1-stack-finder