I am using nodejs CDK to deploy codepipeline to AWS. Below is the code:
const pipeline = new codepipeline.Pipeline(this, this.projectName, {
pipelineName: this.projectName,
role: this.pipelineRole,
stages,
artifactBucket: s3.Bucket.fromBucketName(
this,
'deploymentS3Bucket',
cdk.Fn.importValue(this.s3Bucket)
),
});
It has all stages defined inside stages
array. The question I have is how to disable transition in one of the stage on this pipeline?
I tried below code:
const primaryDeployStage: codepipeline.CfnPipeline = pipeline.node.findChild('Approve') as codepipeline.CfnPipeline;
const stageTransitionProperty: codepipeline.CfnPipeline.StageTransitionProperty = {
reason: 'reason',
stageName: 'stageName',
};
primaryDeployStage. addPropertyOverride('DisableInboundStageTransitions', stageTransitionProperty);
but it says no such method addOverride
error.