miguel-a-calles-mba / serverless-stack-termination-protection

Serverless plugin to update the CloudFormation stack termination protection.
MIT License
23 stars 4 forks source link

Feature Request: Configuration to not set termination protection at all #29

Open jamiem-code opened 2 years ago

jamiem-code commented 2 years ago

I have an issue where if I have serverless-stack-termination-protection plugin added to my stack, yet I choose not to protect a given stage (e.g. local), I'm still seeing a call to updateStackTermination with a value of false.

When using serverless-localstack, I'm seeing a delay from localstack (community edition) when this call is being made:

Recoverable error occurred (API action 'UpdateTerminationProtection' for service 'cloudformation' not yet implemented or pro feature - check https://docs.localstack.cloud/aws/feature-coverage for further information), sleeping for ~6 seconds. Try 4 of 4

That 6 seconds (x 4 tries) is defeating the purpose (deployment speed) of using localstack.

This could be seen as a problem with localstack not supporting the feature, but would it be possible to extend the configuration of this plugin so that if a stage is declared as excluded, then updateStackTermination is just never called for it?