'Missing required properties for aws-cdk-lib.pipelines.StackSteps: stack
I am trying to deploy an AWS CDK pipeline using C# that contains a ChangeSet approval rule. I am facing the following error:
Missing required properties for aws-cdk-lib.pipelines.StackSteps: stack
Here is my new Stage:
var x = new JournalAppStage(this, "test", new StageProps {
Env = new Environment {
Account = System.Environment.GetEnvironmentVariable("CDK_DEFAULT_ACCOUNT"),
Region = System.Environment.GetEnvironmentVariable("CDK_DEFAULT_REGION")
}
});
Here is the Stage definition:
using System.Collections.Generic;
using Amazon.CDK;
using Constructs;
namespace JournalCdk
{
public class JournalAppStage : Stage
{
public Stack journalStack;
public JournalAppStage(Construct scope, string id, StageProps props = null) : base(scope, id, props)
{
Stack journalStack = new JournalCdkStack(this, "JournalStack", new JournalCdkStackProps {
BucketName = System.Environment.GetEnvironmentVariable("BUCKET_NAME"),
Environment = System.Environment.GetEnvironmentVariable("ENVIRONMENT"),
});
}
}
}
And here is where I am trying to add the ChangeSet:
var uatPipelineStage = pipeline.AddStage(x, new AddStageOpts {
StackSteps = new [] { new StackSteps {
Stack = x.journalStack,
ChangeSet = new [] {
new ManualApprovalStep("ChangeSetApproval"),
}
}}
});
I have been knocking up against this for a while and cannot work out the correct way to add the StackSteps.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
