Closed alexeiaguiar closed 1 year ago
I ran into the same issue - received warning email about CDKv1 recommending to scan with this tool, but the output showed:
No AWS CDK V1 stacks found
... adding the var body = null;
and re-running correctly pointed out the 5 CDK v1 stacks that we have.
Thanks for the report! Just fixed this.
We received some emails telling us that we have tens of stacks that are still using CDK v1. When I ran awscdk-v1-stack-finder, it said that no stack was found. This happened for all of our accounts. While I was debugging the code, I saw that the variable
body
had information about a previous stack from the loop, instead of the current one. I'm not 100% sure, but I think this problem happens in this scenario:body
is not null anymore.https://github.com/cdklabs/awscdk-v1-stack-finder/blob/main/src/index.ts#L144-L156
The fix I did in my local project might not be the right one, but I was able to see the stacks that are still using CDK v1. This was the fix I did on line 144: