feat(cloudformation): change sets for CREATE and UPDATE (CFN-4) - #1365
Merged
Merged
Conversation
…ur client tokens, never adopt taken names
…and honour DisableRollback on UpdateStack
NitinKumar004
marked this pull request as ready for review
September 27, 2026 11:59
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.
Summary
Adds CloudFormation change sets for ChangeSetType CREATE and UPDATE.
aws cloudformation deploynow works end to end.deploycalls it before it updates an existing stack.planUpdateandnoChangescode that UpdateStack uses. An empty plan gives a FAILED change set with the real "The submitted information didn't contain changes" reason.runUpdateand CREATE goes through the sharedprovision, so the change set path and the direct stack path use the same code.Changes[]come from a new provider-neutral planner,services/cloudformation/changeplan.go:IncludePropertyValuesreturns BeforeValue, AfterValue and the contexts. A value only known at execution shows{{changeSet:KNOWN_AFTER_APPLY}}, both as AfterValue and inside AfterContext, never its stale resolved value.--use-previous-templateapplies the resources that failed or never ran.Closes
Testing
services/cloudformation, plus provider tests covering the lifecycle, errors, OnStackFailure, retained replacements, client tokens, pagination, snapshot round-trip and a concurrent execute.go build, thengo vetandgo test -raceon the touched packages.golangci-lint --new-from-revreports 0 issues. coveragegen and compatgen were regenerated.cloudemu servewith the aws CLI:deploycovered create, "No changes to deploy", and an update with a parameter change and a queue rename.create-change-setcovered CREATE and UPDATE with a modify and a replacement.describe-change-setreturned the expected Changes, with and without--include-property-values.update-stack --use-previous-template --disable-rollbackcompletes the update. GetTemplate returns the submitted YAML verbatim.update-stack --disable-rollbackfails with a commented YAML body,terraform planwith that same body is clean.cqrolls back with "cq already exists", and the owner's queue survives.aws_cloudformation_stack: apply, then a clean plan, then an update with an in-place change and a replacement, then a clean plan, then destroy.Deferred
--async-settle, together with async stacks in CFN-6. Change sets are planned synchronously, as stacks are.