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';
export interface CustomApplicationStageProps extends CustomStageProps {
vpcID: string;
}
export class CustomApplicationStage extends CustomStage {
constructor(scope: Construct, id: string, props: CustomApplicationStageProps) {
super(scope, id, props);
new ApplicationStack(this, 'app', {
env: props.env,
vpcID: props.vpcID,
});
}
}
Usage
const customDeploymentApp = new CustomApplicationStage(this, 'CustomStage', {
synth: pipeline.synth,
env: {
account: '1234567890',
region: 'af-south-1',
},
vpcID: 'vpc0987654321'
});
const wave = pipeline.addWave('CustomWave');
wave.addPost(customDeploymentApp);