JSPM

serverless-stack-termination-protection

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13322
  • Score
    100M100P100Q161669F
  • License MIT

Serverless plugin to update the CloudFormation stack termination protection

Package Exports

  • serverless-stack-termination-protection
  • serverless-stack-termination-protection/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-stack-termination-protection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Serverless Stack Termination Protection Plugin

Table of Contents

  1. Description
  2. Requirements
  3. Installation
  4. Using the Plugin
  5. Notes
  6. License

Description

Following deployment, the Serverless Framework does not have the option to enable termination protection for the CloudFormation stack. This plugins will enable the termination protection. It can also disable it by using a command line option. This plugin is designed for the Serverless Framework 1.x.

Requirements

  • Serverless Framework 1.x.
  • Node 8.x or greater.
  • NPM 6.x or greater.

Installation

Installing the Serverless Framework

Visit the Getting Started with the Serverless Framework to get started with the Serverless Framework.

Install with npm:

npm install -g serverless

Installing the Plugin

Install with npm:

npm install --save-dev serverless-stack-termination-protection

And then add the plugin to your serverless.yml file:

plugins:
  - serverless-stack-termination-protection

See the example(s).

Using the Plugin

Automatically Enable Termination Protection After Deployment

This plugin enables termination protection automatically after the deployment. Simply run the deploy:

sls deploy

Automatically Disable Termination Protection After Deployment

This plugin can disable termination protection automatically after the deployment. Simply run the deploy with the --disable-termination-protection option:

sls deploy --disable-termination-protection

Apply Protection to Specified Stages

You may apply protection for specific stages by listing the stages under a serverlessTerminationProtection custom property in the serverless yaml file.

custom:
  serverlessTerminationProtection:
    stages:
      - prod

Notes

Future version will:

  • Delete the stack forceably using sls remove --force.

Please request features or report problems using the issues page.

License

See the included LICENSE for rights and limitations under the terms of the MIT license.