feat(cli): add --concurrency flag to cdk destroy#1221
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1221 +/- ##
==========================================
+ Coverage 87.79% 88.05% +0.25%
==========================================
Files 73 73
Lines 10168 10187 +19
Branches 1343 1351 +8
==========================================
+ Hits 8927 8970 +43
+ Misses 1217 1193 -24
Partials 24 24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9 tasks
mrgrain
added a commit
to awsdocs/aws-cdk-guide
that referenced
this pull request
Mar 24, 2026
## Description **Documentation Change Type:** - [ ] Typo/grammar fix - [ ] Clarification or minor improvement - [ ] New example or code snippet - [x] New section or topic - [ ] Major restructuring or enhancement **Affected Documentation Page(s):** - https://docs.aws.amazon.com/cdk/v2/guide/ref-cli-cmd-destroy.html ## Description of Changes Adds the new `--concurrency <NUMBER>` option to the `cdk destroy` command reference page. This option was introduced in [aws/aws-cdk-cli#1221](aws/aws-cdk-cli#1221). Also adds a usage example showing concurrent stack deletion. ## Motivation and Context The `--concurrency` flag for `cdk destroy` has shipped in the CDK CLI but is not yet documented. The option mirrors the existing `cdk deploy --concurrency` behavior, allowing users to destroy multiple stacks in parallel while respecting dependency order. ## How Has This Been Validated? - Verified formatting is consistent with the existing `--concurrency` option on the `cdk deploy` reference page - Confirmed all facts against the source PR ([aws/aws-cdk-cli#1221](aws/aws-cdk-cli#1221)) ## Checklist - [x] My changes follow the [AsciiDoc syntax](./CONTRIBUTING.md#asciidoc-syntax-reference) guidelines - [x] I have previewed my changes using GitHub's preview or a local AsciiDoc renderer - [x] My changes maintain consistent formatting with the rest of the documentation - [x] I have checked that all links work correctly ## Additional Information The option entry and example were modeled directly on the existing `--concurrency` documentation for `cdk deploy` to ensure consistency. --------- Co-authored-by: Momo Kornher <mail@moritzkornher.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #752
Description
Add
--concurrencyflag tocdk destroy, mirroring the existingcdk deploy --concurrencybehavior. When set to a value greater than 1, multiple stacks are destroyed in parallel while respecting dependency order (reversed from deploy).Uses
WorkGraphwith reversed dependency edges to orchestrate parallel destruction. A newWorkGraph.processStacks()method provides a stack-only execution path, and the graph construction logic lives in its ownbuild-destroy-work-graphmodule.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license