Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New stack combinator #10

Open
fogfish opened this issue Oct 26, 2019 · 0 comments
Open

New stack combinator #10

fogfish opened this issue Oct 26, 2019 · 0 comments

Comments

@fogfish
Copy link
Owner

fogfish commented Oct 26, 2019

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant