pistazie / cdk-dia

Automated diagrams of CDK provisioned infrastructure
MIT License
877 stars 37 forks source link

Any way to get the diagram of "cdk diff"? #27

Open gabrielenosso opened 1 year ago

gabrielenosso commented 1 year ago

Is there the possibility, or could there be, a way to generate the diagram highlighting the differences?

Would be amazing to have maybe a border or background colored behind resources (red for removed, yellow for modified, green for new resources).

pistazie commented 1 year ago

I find visual diff very interesting.

I guess this isn't trivial due to the lack of "plugin-ability" in AWS-CDK.

I guess one would first have to investigate, how CDK produces diffs and then think of whether this process can be integrated into cdk-dia.

gabrielenosso commented 1 year ago

There's a tool which reverse engineered the diff, and is now able to give you a JSON file with all the info: https://www.npmjs.com/package/cdk-pretty-diff

If you try it out, be sure to install v2 (npm i cdk-pretty-diff@2)