1 Answer
- Newest
- Most votes
- Most comments
0
Hi Glenn,
To create a Changeset for the entire stack hierarchy, including the nested stacks, you need to use the
--include-nested-stacks
parameter when running the
create-change-set
command in the AWS CLI. This ensures that the Changesets for the nested stacks are also created and can be executed.
Example AWS CLI command:
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
After the Changeset is created, you can execute it using the
execute-change-set
command. This will apply the changes to the entire stack hierarchy, including the nested stacks.
Example AWS CLI command:
aws cloudformation execute-change-set
--stack-name my-root-stack
--change-set-name my-root-stack-change-set
If you are still unable to delete the failed Changesets for the nested stacks, you can try the following:
Use the
describe-change-set
command to get more details about the failed Changesets.
If the Changesets are still in a "Failed" state, you may need to wait for some time before they can be deleted.
As a last resort, you can try deleting the entire stack and recreating it with the updated template.
answered a month ago
Relevant content
- asked 2 months ago
- asked 6 months ago
- asked 10 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
Thanks for the comment, though it hasn't helped resolve the issue. Indeed, highlighting the describe-change-set command confirms that the Failed nested changeset points to a parent/root changeset that no longer exists because it successfully executed, i.e. "ExecutionStatus": "EXECUTE_COMPLETE". It has, however, appeared to help confirm there is a bug with AWS when dealing with nested CloudFormation templates in that if nested templates don't actually have any changes they end-up in a hung state, i.e. neither executing because there are no changes nor being deleted/removed when the parent/root script executes. Unfortunately my company does not have any Support Plan so can't raise this matter directly with AWS.