New stack combinator
fogfish opened this issue · 0 comments
fogfish commented
As a developer
I want to give a name and pass parameters to cdk.Stack
So that single application delivers immutable green/blue variants of same stack
With current API, you do
const app = new cdk.App()
const stack = new cdk.Stack(app, `xxx-${vsn}`, {
env: {
account: process.env.CDK_DEFAULT_ACCOUNT,
region: process.env.CDK_DEFAULT_REGION
}
})
pure.join(stack, MyComponent)
app.synth()
I'd like to make it
const Stack = (): cdk.StackProps => ({ env: {} })
const stack = pure.iaac(cdk.Stack)(Stack).effect(x => pure.join(x, MyComponent))
const app = new cdk.App()
pure.join(app, stack)