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

(core): allow synthesizing a CFN template as an asset (without necessarily deploying it) #12249

Closed
1 of 2 tasks
wulfmann opened this issue Dec 28, 2020 · 8 comments
Closed
1 of 2 tasks
Labels
@aws-cdk/core Related to core CDK functionality effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1

Comments

@wulfmann
Copy link
Contributor

I would like to be able to synthesize and publish cloudformation stack assets without actually creating (deploying) the stack.

Use Case

When using features like Modules or StackSets, you need to provide an s3 url for the template you want to use.

In order to make these features simpler to use with CDK, i'd like the add a cli/configuration/stack option to not actually create the stack on deployment. There may be a simpler way to do this, but i'd like the following experience:

  • I create a stack (stack1) that contains my module/stackset template.
  • I create another stack (stack2) that accepts stack1 as a parameter. I can then use this stack to build the asset / get other properties i may need for the stackset/module.
  • I run the cdk deploy command and both stack1 and stack2 are synthesized / published to s3, but only stack2 is created/updated.

Proposed Solution

Ideas:

  • Property on the core.Stack class: deploy: false.

Other

Current workaround:

Maintain 2 separate core.App files. One that is "deployed" and one that is not. The "deployed" app stacks expect that app1 is synthesized first, and then it uses the filesystem to fetch the corresponding templates.

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@wulfmann wulfmann added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 28, 2020
@wulfmann
Copy link
Contributor Author

I poked around a little bit to check if this is a duplicate, but didn't notice anything immediately. Feel free to close if it is.

@wulfmann wulfmann changed the title (core/cli): allow a property in code to mark a stack as "not to be deployed" (core/cli): allow a property in code to mark a stack as "not to be created" Dec 28, 2020
@NGL321 NGL321 changed the title (core/cli): allow a property in code to mark a stack as "not to be created" (core): allow a property in code to mark a stack as "not to be created" Feb 1, 2021
@github-actions github-actions bot added the @aws-cdk/core Related to core CDK functionality label Feb 1, 2021
@rix0rrr
Copy link
Contributor

rix0rrr commented Feb 8, 2021

This is an interesting request. I feel there's probably a generalization to be made between Stack, NestedStack and what you're asking for. Something like a CfnTemplate or something.

For example, passing a Stack to a Module doesn't feel quite right.

Seems like a useful feature for the use cases you indicated.

@rix0rrr rix0rrr added effort/medium Medium work item – several days of effort p1 labels Feb 8, 2021
@rix0rrr rix0rrr changed the title (core): allow a property in code to mark a stack as "not to be created" (core): allow synthesizing a CFN template as an asset (without necessarily deploying it) Feb 8, 2021
@rix0rrr
Copy link
Contributor

rix0rrr commented Mar 11, 2021

Probably also related to #11896

@wulfmann
Copy link
Contributor Author

Probably also related to #11896

Yea 100% this is a use-case for my original issue. Would love to see this get traction!

@ryparker ryparker removed the needs-triage This issue or PR still needs to be triaged. label Jun 2, 2021
@github-actions
Copy link

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jun 17, 2022
@fitzoh
Copy link

fitzoh commented Jun 17, 2022

If you want to keep this issue open, please leave a comment below

Yes please, I want this for stack sets specifically

@github-actions github-actions bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jun 17, 2022
@comcalvi
Copy link
Contributor

Closing this as a duplicate of #11896, which is linked to the StackSets L2 RFC.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/core Related to core CDK functionality effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

No branches or pull requests

5 participants