How do I add StackSteps to Application Stage (trying to manually approve change set) #16982
Unanswered
aws-cdk-noob
asked this question in
Q&A
Replies: 1 comment
-
@aws-cdk-noob , you can add your stack as a property of your stage. For example: export class MyStage extends Stage {
readonly appStack: MyStack;
constructor(scope: Construct, id: string, stageOpts?: ....) {
super(scope, id, props);
const stack = new MyStack(this, 'MyStack', { ... });
this.appStack = stack;
}
} Then in your pipeline code you can access it: const myStage = new MyStage(....);
myStage.appStack; I hope this helps |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I am trying to add Validations to my CDK App so that I can review changes to the application before they are deployed. When looking at the CDK Docs I found that adding StackSteps and specifying a ManualReview for the ChangeSet would be ideal. However I cannot find any further examples anywhere of StackSteps being implemented from AWS or in people's individual github repos.
My project is based off of this AWS Developer Blog post which uses the new CodePipeline Construct for deploying applications.
In my project structure I have two Typescript files:
When using AWS' supplied example they give no reference for how to reference the stack of your application. Any ideas for how I'm supposed to supply the stack for stackSteps?
pipeline.addStage(appStage, { stackSteps: [{ stack: Stack.of(appStage.service2), pre: [new ManualApprovalStep('Pre-Stack Check')], // Executed before stack is prepared changeSet: [new ManualApprovalStep('ChangeSet Approval')], // Executed after stack is prepared but before the stack is deployed post: [new ManualApprovalStep('Post-Deploy Check')], // Executed after staack is deployed }], });
Beta Was this translation helpful? Give feedback.
All reactions