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

High level API for outputs? #2036

Closed
eladb opened this issue Mar 18, 2019 · 3 comments · Fixed by #12778
Closed

High level API for outputs? #2036

eladb opened this issue Mar 18, 2019 · 3 comments · Fixed by #12778
Assignees
Labels
@aws-cdk/core Related to core CDK functionality effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@eladb
Copy link
Contributor

eladb commented Mar 18, 2019

I am wondering if we should provide a higher level API for outputs, now that #1960 is merged. Maybe something like stack.addOutput()?

Related #2012

@NGL321 NGL321 added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Sep 10, 2019
@NGL321 NGL321 added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Sep 10, 2019
@eladb eladb added @aws-cdk/core Related to core CDK functionality feature-request A feature should be added or improved. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Sep 11, 2019
@eladb eladb added the effort/small Small work item – less than a day of effort label Jan 23, 2020
@SomayaB SomayaB removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jan 30, 2020
@eladb eladb added the p2 label Aug 17, 2020
@eladb eladb assigned rix0rrr and unassigned eladb Aug 17, 2020
@iRoachie
Copy link
Contributor

iRoachie commented Oct 25, 2020

@eladb

  • Would the props and API be the same as CfnOutput?
  • Do we need an L2 for CfnCondition first? I'd assume so since the condition would be in the public API of Output

@eladb
Copy link
Contributor Author

eladb commented Oct 25, 2020

Would the props and API be the same as CfnOutput?

I would assume, perhaps with some stronger typing when possible.

Do we need an L2 for CfnCondition first.

Probably.


How about use this issue as a mini-RFC for this feature? The best way would be to "work backwards from the README". Add a comment in this issue with a proposal for the future README section. This way, we can agree on the right API first.

@mergify mergify bot closed this as completed in #12778 Feb 1, 2021
mergify bot pushed a commit that referenced this issue Feb 1, 2021
…e" (#12778)

Deadly embrace (<3 who came up with this term) is an issue where a consumer
stack depends on a producer stack via CloudFormation Exports, and you want to
remove the use from the consumer.

Removal of the resource sharing implicitly removes the CloudFormation Export,
but now CloudFormation won't let you deploy that because the deployment order
is always forced to be (1st) producer (2nd) consumer, and when the producer deploys
and tries to remove the Export, the consumer is still using it.

The best way to work around it is to manually ensure the CloudFormation Export
exists while you remove the consuming relationship. @skinny85 has a [blog
post] about this, but the mechanism can be more smooth.

Add a method, `stack.exportValue(...)` which can be used to
create the Export for the duration of the deployment that breaks
the relationship, and add an explanation of how to use it.

Genericize the method a bit so it also solves a long-standing issue about no L2 support for exports.

Fixes #7602, fixes #2036.

[blog post]: https://www.endoflineblog.com/cdk-tips-03-how-to-unblock-cross-stack-references


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Feb 1, 2021

⚠️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.

NovakGu pushed a commit to NovakGu/aws-cdk that referenced this issue Feb 18, 2021
…e" (aws#12778)

Deadly embrace (<3 who came up with this term) is an issue where a consumer
stack depends on a producer stack via CloudFormation Exports, and you want to
remove the use from the consumer.

Removal of the resource sharing implicitly removes the CloudFormation Export,
but now CloudFormation won't let you deploy that because the deployment order
is always forced to be (1st) producer (2nd) consumer, and when the producer deploys
and tries to remove the Export, the consumer is still using it.

The best way to work around it is to manually ensure the CloudFormation Export
exists while you remove the consuming relationship. @skinny85 has a [blog
post] about this, but the mechanism can be more smooth.

Add a method, `stack.exportValue(...)` which can be used to
create the Export for the duration of the deployment that breaks
the relationship, and add an explanation of how to use it.

Genericize the method a bit so it also solves a long-standing issue about no L2 support for exports.

Fixes aws#7602, fixes aws#2036.

[blog post]: https://www.endoflineblog.com/cdk-tips-03-how-to-unblock-cross-stack-references


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants