L2s: return a concrete physical name/ARN instead of token when possible #928
Labels
feature-request
A feature should be added or improved.
package/awscl
Cross-cutting issues related to the AWS Construct Library
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"
forbucket.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.The text was updated successfully, but these errors were encountered: