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

In-app/cross-stack references #1324

Closed
rix0rrr opened this issue Dec 11, 2018 · 0 comments
Closed

In-app/cross-stack references #1324

rix0rrr opened this issue Dec 11, 2018 · 0 comments
Labels
@aws-cdk/core Related to core CDK functionality

Comments

@rix0rrr
Copy link
Contributor

rix0rrr commented Dec 11, 2018

It should be possible to transparently reference resources in one stack from another stack, as long as both stacks are defined in the same CDK app. That is, the current export()/import() mechanism should not be necessary (which can then subsequently be co-opted for cross-app references).

Initially we will restrict to references between stacks in the same account and region (so that we can implement using Fn::ImportValue). A natural extension later on will be to extend to cross-account cross-region references.


Requirements:

  • References to cross-stack attributes turn into Exports on the providing side, and Fn::ImportValue on the importing side.
  • References should record a dependency between stacks, so that:
    • We can reject cycles
    • cdk deploy can deploy multiple stacks in the right order.
  • Mutations on passed objects (for the purposes of grant() etc) are still possible.

Non-requirements (but future extensions, tickets to be created later):

  • Cross-account or cross-region references
  • Solving stack dependency cycles (by automatically splitting single logical stack into multiple physical stacks).

Some related but distinct tickets:

#1095 - exporting across CDK apps
#49 - cross region/account references
#928 - L2s: return a concrete ARN instead of Token if possible

@rix0rrr rix0rrr added 🤔 design @aws-cdk/core Related to core CDK functionality labels Dec 11, 2018
@rix0rrr rix0rrr closed this as completed in d7371f0 Jan 9, 2019
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
Projects
None yet
Development

No branches or pull requests

2 participants