aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

enable-termination-protection flag

Open vrangasam opened this issue 5 years ago • 5 comments

Description:

CloudFormation's create-stack offers enable-termination-protection flag to protect a stack from getting deleted.

Is it possible to offer that flag in sam?

vrangasam avatar Jan 24 '20 17:01 vrangasam

some info about possible implementation.

SAM CLI uses create-change-set API to create stacks, which does not have enable-termination-protection flag as create-stack does. If we choose to add this flag, we might need to call update-termination-protection API after creation

aahung avatar May 13 '21 19:05 aahung

Still using a workaround chaining the sam calls with aws cloudformation update-termination-protection --enable-termination-protection --stack-name "$STACK_NAME".

yuri1969 avatar Apr 23 '24 08:04 yuri1969