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

feat: initial implementation of a StackSet L2 construct #2

Merged
merged 5 commits into from
Jan 12, 2023

Conversation

corymhall
Copy link
Contributor

@corymhall corymhall commented Jan 5, 2023

See README.md

We don't have to publish this right away if we don't want to, but I have most of an L2 for StackSets that I want to get out there. Some things that we should do.

  1. We now have a couple of places where we are creating a different type of "Stack" and Synthesizer. We should centralize this in Core.
  2. This does not currently handle assets. I originally built this for cdk bootstrap which doesn't use assets. We should be able to add similar functionality that Service Catalog uses.

Fixes #

@corymhall corymhall marked this pull request as draft January 5, 2023 16:48
README.md Show resolved Hide resolved
accounts: ['11111111111'],
}),
template: StackSetTemplate.fromStackSetStack(stackSetStack),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some related questions:

  1. Can multiple StackSetStacks be defined in the same scope?
  2. Would it make sense to require that a StackSet be defined in the scope of a StackSetStack?
  3. (if the answer to the above is "no") Is there a way to infer which StackSetStack is the correct one, instead of forcing the user to pass a template property?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can multiple StackSetStacks be defined in the same scope?
Would it make sense to require that a StackSet be defined in the scope of a StackSetStack?
(if the answer to the above is "no") Is there a way to infer which StackSetStack is the correct one, instead of forcing the user to pass a template property?

It's a little confusing, but I modeled this after the way Service Catalog works. The StackSet construct is the L2 for the CfnStackSet CloudFormation resource and it requires that you give it a CloudFormation Stack template. We can't just use a normal cdk.Stack because there are some limitations to StackSet stack templates that we need to account for. Long term I also want to have other ways of providing a template

template: StackSetTemplate.fromStackSetStack(stackSetStack);
template: StackSetTemplate.fromAsset(asset);
template: StackSetTemplate.fromInline('');
etc.

@corymhall corymhall marked this pull request as ready for review January 12, 2023 20:42
Signed-off-by: github-actions <[email protected]>
@corymhall corymhall merged commit 3eef2f3 into main Jan 12, 2023
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

Successfully merging this pull request may close these issues.

3 participants