change sets
tf plan → create changesets tf apply - > direct update or use change sets and apply them
Rollback behavior
In case of provisioning failure you can either
- choose to keep successfully created resources
- rollback all of the resources
- you can use deletion policy or
- you can simply delete all of the resources

Deletion policy
Resources:
MyVolume:
Type: AWS::EC2::Volume
DeletionPolicy: Retain
Properties:
Size: 10
AvailabilityZone: us-east-1a
Supported Values:
Retain
→ Resource stays. You must manually delete it later.Snapshot
→ For snapshot-able resources (e.g., RDS, EBS)
→ Automatically creates a snapshot before deletion.Delete(default)
→ Resource is deleted when stack is deleted or rolled back.
Important:
DeletionPolicyis per-resource.- Doesn’t protect from explicit deletes outside CloudFormation.
- Doesn’t stop updates that replace the resource.
Termination protection
- If you attempt to delete a stack with termination protection enabled, the deletion fails and the stack - including its status - remains unchanged