Forem

Dakota Lewallen
Dakota Lewallen

Posted on

4

TIL: How to CDK Diff Your Entire App

If you use the AWS CDK to deploy resources, you may also likely use the Pipelines construct to deploy. Let's say you do, and you run a cdk diff against your app prior to committing. It's awfully disappointing as it will only show you changes to the encasing pipeline.
However thanks to this fantastic answer from @fedonev on StackOverflow, I learned that there is special syntax within the CDK CLI that allows you to wildcard the stack you would like a command to run against.

You may also use wildcards to specify IDs that match a pattern.
? matches any single character
* matches any number of characters (* alone matches all stacks)
** matches everything in a hierarchy

So running

  cdk diff '**'
Enter fullscreen mode Exit fullscreen mode

Will diff not only diff the pipeline stack, but all the stack's within your application.

The more you know


Find me on Mastodon | LinkedIn | Github | Substack

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

πŸ‘‹ Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay