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

L2s: return a concrete physical name/ARN instead of token when possible #928

Closed
eladb opened this issue Oct 14, 2018 · 2 comments
Closed
Assignees
Labels
feature-request A feature should be added or improved. package/awscl Cross-cutting issues related to the AWS Construct Library

Comments

@eladb
Copy link
Contributor

eladb commented Oct 14, 2018

For things like cross-region/account references (#49), it might be needed to use "well-known" physical names for resources when they are referenced across stacks.

Today, L2 properties that represent attributes are always resolved to the L1 attribute. For example, bucket.bucketName will always resolve to { "Fn::GetAtt": [ "ID", "Name" ] }. However, if users explicitly specified a bucket name when they defined the bucket (new Bucket(this, 'Mybucket', { bucketName: 'foo' })), then why not just return "foo" for bucket.bucketName?

Then, consumers can use something like unresolved(bucket.bucketName) to determine if this is a concrete valuer or not when they read the value.

@skinny85
Copy link
Contributor

I believe the current reason for always using { "Fn::GetAtt": [ "MyResource", "Name" ] } instead of just 'foo' is that the former establishes an implicit dependency ordering in CloudFormation. This way, we're certain resources in the Stack will get created in the correct order.

@srchase srchase added feature-request A feature should be added or improved. and removed enhancement labels Jan 3, 2019
@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 package/awscl Cross-cutting issues related to the AWS Construct Library and removed closing-soon This issue will automatically close in 4 days unless further comments are made. pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Sep 11, 2019
@eladb
Copy link
Contributor Author

eladb commented Jan 23, 2020

Duplicate with #4093

@eladb eladb closed this as completed Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. package/awscl Cross-cutting issues related to the AWS Construct Library
Projects
None yet
Development

No branches or pull requests

5 participants