atmos aws cloudformation stackset delete
Delete a CloudFormation StackSet. CloudFormation requires every stack
instance to be removed before the StackSet itself can be deleted, so
stackset delete lists the StackSet's current instances, deletes them all
(DeleteStackInstances, retaining no resources) if any exist, waits for
that operation to finish, and only then deletes the StackSet
(DeleteStackSet).
Usage
atmos aws cloudformation stackset delete <component> --stack <stack> [options]
atmos aws cloudformation stackset delete vpc -s plat-ue2-dev
Skip the interactive confirmation prompt:
atmos aws cloudformation stackset delete vpc -s plat-ue2-dev --auto-approve
Delete StackSets for all or affected components in dependency order:
atmos aws cloudformation stackset delete --all -s plat-ue2-dev
atmos aws cloudformation stackset delete --affected --base origin/main
Flags
--stack,-s(required)- Atmos stack.
--auto-approve(optional)- Skip the interactive confirmation prompt. Without it,
stackset deleteprompts for confirmation on a TTY before deleting the StackSet. --all(optional)- Delete StackSets for all
aws/cloudformationcomponents in dependency order. --affected(optional)- Delete StackSets for affected
aws/cloudformationcomponents and their dependencies. --include-dependents(optional)- With
--affected, include dependentaws/cloudformationcomponents. --tags(optional)- Filter by tags (comma-separated, matches any):
--tags=production,tier-1. Composes with--all/--affectedto narrow the selected set further; cannot be combined with a single component argument. --labels(optional)- Filter by labels (comma-separated
key=valueorkey:valuepairs, matches all):--labels=cost-center=platform,compliance=sox. Composes with--all/--affected/--tags; cannot be combined with a single component argument.
Behavior
stackset delete acts directly on the StackSet whose name matches the
component's stack_name — it takes no --target flag and does not need a
kind: aws/stackset provision target declared. The DeleteStackInstances
operation is polled every 3 seconds until it reaches a terminal status
(SUCCEEDED/FAILED/STOPPED), and the command times out after 30 minutes
if it hasn't.