Repository navigation
fix(toolkit-lib): report termination protection changes during deploy - #2173
Merged
mrgrain merged 1 commit intoNov 26, 2026
Merged
Conversation
azatoth
requested a deployment
to
integ-approval
November 22, 2026 11:12 — with
GitHub Actions
Waiting
2 tasks done
aws-cdk-automation
enabled auto-merge
November 22, 2026 11:12
auto-merge was automatically disabled
November 24, 2026 07:43
Head branch was pushed to by a user without write access
azatoth
force-pushed
the
fix/report-termination-protection-change
branch
from
November 24, 2026 07:43
508ad7f to
d69365b
Compare
azatoth
requested a deployment
to
integ-approval
November 24, 2026 07:43 — with
GitHub Actions
Waiting
When a deployment changes only the stack's termination protection, the change set is empty and the deploy reports "(no changes)", while the termination protection update itself was only logged at debug level. Report the update at info level so the user can see what changed. Refs aws/aws-cdk#32043 Co-Authored-By: Claude Opus 5.5 <[email protected]>
azatoth
force-pushed
the
fix/report-termination-protection-change
branch
from
November 26, 2026 07:46
d69365b to
46c4303
Compare
mrgrain
approved these changes
Nov 26, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2173 +/- ##
=======================================
Coverage 92.52% 92.52%
=======================================
Files 81 81
Lines 13224 13224
Branches 1915 1915
=======================================
Hits 12236 12236
Misses 950 950
Partials 38 38
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:
|
This branch was successfully deployed
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.
Relates to aws/aws-cdk#32043 (filed in aws/aws-cdk before the CLI moved here). This PR covers deploy, and the diff side is #2174, which will close the issue.
When a deployment changes only the stack's termination protection, CloudFormation creates an empty change set. The deploy then reports
✅ MyStack (no changes), even thoughUpdateTerminationProtectionwas called. The only trace of that call was a debug-level log line, so nothing in the normal output said what changed.This PR reports the update at info level:
noOpis unchangedOne option was to return
noOp: falsein this case. I decided against it:Deployments.prepareStack()and the deploy loop inToolkit.deploy()/CdkToolkit.deploy()usenoOpto mean "there is no change set to execute". WithnoOp: false, an empty prepared change set is no longer final, and deploy would go through a second, executing pass.noOpstill means "CloudFormation had nothing to do", and the termination protection change gets its own message.Out of scope: termination protection is changed before approval
updateTerminationProtection()runs in the change-set path even whenexecute: false. For an executing deploy, the first phase isprepareStack(), so termination protection is already updated before the approval prompt is shown. Declining the prompt doesn't undo it. Changing that would also change--no-executebehaviour, so I left it for a separate discussion.The diff side (showing the change in
cdk diff) is a separate PR.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
🤖 Generated with Claude Code