Conversation
Deploy, watch, and import already accept --change-set-name, but diff always creates its change set with the hardcoded name 'cdk-diff-change-set'. Add a changeSetName option to toolkit-lib's ChangeSetDiffOptions and plumb it through to createDiffChangeSet, keeping the existing name as the default. Expose it as --change-set-name on cdk diff, rejected when combined with --method=template (consistent with deploy rejecting it for --method=direct).
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1982 +/- ##
==========================================
- Coverage 91.32% 91.31% -0.02%
==========================================
Files 79 79
Lines 12215 12233 +18
Branches 1724 1725 +1
==========================================
+ Hits 11155 11170 +15
- Misses 1025 1027 +2
- Partials 35 36 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
Shouldn't we also switch to |
rix0rrr
reviewed
Sep 21, 2026
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.
cdk deploy,cdk watch, andcdk importall accept--change-set-name, butcdk diffalways creates its change set with the hardcoded namecdk-diff-change-set. In automated environments where multiple diffs can run against the same stack, or where change set names are used for auditing, callers need to control that name — same motivation that added the flag to deploy in the first place.This adds a
changeSetNameoption to toolkit-lib'sChangeSetDiffOptionsand plumbs it through tocreateDiffChangeSet, keepingcdk-diff-change-setas the default so existing behavior is unchanged. The CLI exposes it as--change-set-nameoncdk diff, and rejects the combination with--method=template(where no change set is created), consistent with deploy rejecting it for--method=direct.createValidationChangeSetexplicitlyOmits the new option, since the validation change set used bycdk diagnosederives its name from a per-run UUID.Verified with new unit tests in both packages (custom name reaches
CreateChangeSetCommand; CLI passes the flag through and rejects incompatible methods) plus full green builds including the toolkit-lib API Extractor check.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license