custom-stack-deployment
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

This library allows custom stack deployment to the AWS regions where regular CDK pipeline deployment isn't supported yet. The declaration and usage of custom stage is almost identical to using regular CDK stage

Declaration

import { CustomStage, CustomStageProps } from 'custom-stack-deployment';

// additional props that can be passed to custom stage
export interface CustomApplicationStageProps extends CustomStageProps {
  vpcID: string;
}

// declare custom deployment stage
export class CustomApplicationStage extends CustomStage {
  constructor(scope: Construct, id: string, props: CustomApplicationStageProps) {
    super(scope, id, props);

    // instantiate application stacks
    new ApplicationStack(this, 'app', {
      // set environment where stack will be deployed
      env: props.env,
      // pass additional props to the stacks
      vpcID: props.vpcID,
    });
  }
}

Usage

// instantiate the custom stage
const customDeploymentApp = new CustomApplicationStage(this, 'CustomStage', {
  // pass synth step of the pipeline
  synth: pipeline.synth,
  // set environment where stage's stacks will be deployed
  env: {
    account: '1234567890',
    region:  'af-south-1',
  },
  // pass additional props to the stacks
  vpcID: 'vpc0987654321'
});

// add stage to the pipeline's wave
const wave = pipeline.addWave('CustomWave');
wave.addPost(customDeploymentApp);

Readme

Keywords

none

Package Sidebar

Install

npm i custom-stack-deployment

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.94 kB

Total Files

5

Last publish

Collaborators

  • ygalanter