💾 Archived View for cfdocs.wetterberg.nu › change-sets-for-nested-stacks.gemini captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
With *change sets for nested stacks* you can preview the changes to your application and infrastructure resources across the entire nested stack hierarchy and proceed with updates when you’ve confirmed that all the changes are as intended.
See the following sections for more details about change sets for nested stacks:
Change sets for nested stacks combines the following features together to expand the scope of previewing changes to the entire stack hierarchy:
Updating stacks using change sets
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/create-change-set.html
To create a change set (AWS CLI)
The following AWS CLI example is of a `create-change-set` input.
aws cloudformation create-change-set \ --stack-name my-root-stack \ --change-set-name my-root-stack-change-set \ --template-body file://template.yaml \ --capabilities CAPABILITY_IAM \ --include-nested-stacksÂ
The following AWS CLI example is of a `create-change-set` output.
{ Â Â "Id":"arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-root-stack-change-set/4eca1a01-e285-xmpl-8026-9a1967bfb4b0", Â Â "StackId": "arn:aws:cloudformation:us-west-2:123456789012:Stack/my-root-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204" }
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/describe-change-set.html
To view a change set (AWS CLI)
The following AWS CLI example is of a `describe-change-set` input for the root stack change set.
aws cloudformation describe-change-set \ Â Â --change-set-name my-root-stack-change-set \ Â Â --stack-name my-root-stack
The following AWS CLI example is of a `describe-change-set` output for the root stack change set.
{ "Changes": [ { "Type": "Resource", "ResourceChange": { "Action": "Modify", "LogicalResourceId": "ChildStack", "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-nested-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99205", "ResourceType": "AWS::CloudFormation::Stack", "Replacement": "False", "ChangeSetId": "arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-nested-stack-change-set/4eca1a01-e285-xmpl-8026-9a1967bfb4b0", "Scope": [ "Properties" ], "Details": [ { "Target": { "Attribute": "Properties", "RequiresRecreation": "Never" }, "Evaluation": "Dynamic", "ChangeSource": "Automatic" } ] } } ], "ChangeSetName": "my-root-stack-change-set", "ChangeSetId": "arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-root-stack-change-set/4eca1a01-e285-xmpl-8026-9a1967bfb4b0", "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-root-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204", "StackName": "my-root-stack", "IncludeNestedStacks": true, "ParentChangeSetId": null, "RootChangeSetId": null, "Description": null, "Parameters": null, "CreationTime": "2020-11-18T05:20:56.651Z", "ExecutionStatus": "AVAILABLE", "Status": "CREATE_COMPLETE", "StatusReason": null, "NotificationARNs": [ ], "RollbackConfiguration": { }, "Capabilities": [ "CAPABILITY_IAM" ], "Tags": null }
The following AWS CLI example is of a `describe-change-set` input for the nested stack change set.
aws cloudformation describe-change-set \ Â Â --change-set-name my-nested-stack-change-set \ Â Â --stack-name my-nested-stack
The following AWS CLI example is of a `describe-change-set` output for the nested stack change set.
{ "Changes": [ { "Type": "Resource", "ResourceChange": { "Action": "Modify", "LogicalResourceId": "function", "PhysicalResourceId": "my-function", "ResourceType": "AWS::Lambda::Function", "Replacement": "False", "ChangeSetId": null, "Scope": [ "Properties" ], "Details": [ { "Target": { "Attribute": "Properties", "Name": "Timeout", "RequiresRecreation": "Never" }, "Evaluation": "Static", "ChangeSource": "DirectModification" } ] } } ], "ChangeSetName": "my-nested-stack-change-set", "ChangeSetId": "arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-nested-stack-change-set/4eca1a01-e285-xmpl-8026-9a1967bfb4b0", "StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-nested-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99205", "ParentChangeSetId": "arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-root-stack-change-set/4eca1a01-e285-xmpl-8026-9a1967bfb4b0", "RootChangeSetId": "arn:aws:cloudformation:us-west-2:123456789012:changeSet/my-root-stack-change-set/4eca1a01-e285-xmpl-8026-9a1967bfb4b0", "IncludeNestedStacks": true, "StackName": "my-nested-stack", "Description": null, "Parameters": null, "CreationTime": "2020-11-18T05:20:56.651Z", "ExecutionStatus": "UNAVAILABLE", "Status": "CREATE_COMPLETE", "StatusReason": "Executable from root change set", "NotificationARNs": [ ], "RollbackConfiguration": { }, "Capabilities": [ "CAPABILITY_IAM" ], "Tags": null }
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/execute-change-set.html
To execute a change set (AWS CLI)
The following AWS CLI example is of an `execute-change-set` input.
aws cloudformation execute-change-set --stack-name my-root-stack \Â Â Â --change-set-name my-root-stack-change-set
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/delete-change-set.html
To delete a change set (AWS CLI)
The following AWS CLI example is of a `delete-change-set` input on the root change set.
aws cloudformation delete-change-set --stack-name my-root-stack \Â Â Â --change-set-name my-root-stack-change-set