Hi I have created self mutating CDK pipeline for my infrastructure deployment.
I have added different application stages to this pipeline like Deploy to DEV, Deploy to UAT, Deploy to PROD Pipeline is working as expected and deploying changes to DEV -> UAT -> PROD environment but before deploying to UAT and PROD I would like to have manual Approval action so that changes will not deploy automatically to UAT and PROD there has to be manual approval action button after that button click changes should get promoted to higher environment.
I can find that option in code pipeline but I couldn't find such option in CdkPipeline construct.
Here is sample code -
const pipeline = new CdkPipeline(this, 'Pipeline', {
// The main pipeline name
pipelineName: 'Infra-Inception-Pipeline',
cloudAssemblyArtifact,
// Where the cdk source can be found
sourceAction: new codepipeline_actions.CodeCommitSourceAction({
actionName: "CloneCodeCommitRepo",
repository: cdkSourceCodeRepo,
output: cdkSourceOutput,
// branch: "develop"
}),
// How will cdk be built and synthesized
synthAction: SimpleSynthAction.standardNpmSynth({
sourceArtifact: cdkSourceOutput,
cloudAssemblyArtifact,
// We need a build step to compile the TypeScript
buildCommand: 'npm run build'
}),
});
pipeline.addApplicationStage(new CreateInfrastructureStage(this, 'DEV',
{
env: { "account":"1111" "region":"us-east-1" }
}));
//I would like to add Manual Approval gate here
pipeline.addApplicationStage(new CreateInfrastructureStage(this, 'UAT',
{
env: { "account":"2222" "region":"us-east-1" }
}));