cdk-aspects-removal-policy
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

cdk-aspects-removal-policy

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

Apply RemovalPolicy using aws-cdk aspects.

Install

npm i -D cdk-aspects-removal-policy

Usage

import { App, Aspects, RemovalPolicy } from 'aws-cdk-lib';
import { ApplyRemovalPolicy } from 'cdk-aspects-removal-policy';
import { StatelessStack } from './YourStatelessStack';
import { StatefulStack } from './YourStatefulStack';

const app = new App();
const statefulStack = new StatefulStack(app, 'StatefulStack');
const statelessStack = new StatelessStack(app, 'StatelessStack');

// Apply RemovalPolicy.
Aspects.of(statefulStack).add(new ApplyRemovalPolicy(RemovalPolicy.RETAIN));
Aspects.of(statelessStack).add(new ApplyRemovalPolicy(RemovalPolicy.DESTROY));

app.synth();

Dependencies (0)

    Dev Dependencies (21)

    Package Sidebar

    Install

    npm i cdk-aspects-removal-policy

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    8.49 kB

    Total Files

    9

    Last publish

    Collaborators

    • masahirompp