aws-cdk-rfcs icon indicating copy to clipboard operation
aws-cdk-rfcs copied to clipboard

Common API for Resources with Web Addresses

Open nathanpeck opened this issue 5 years ago • 1 comments

One thing that I'd like to see improved is a consistent way of exposing the domain name of something. Currently there are a lot of different schemes for different constructs

LoadBalancer.dnsName LambdaRestApi.url CloudFrontWebDistribution.domainName LoadBalancedFargateService.loadbalancer.dnsName Bucket.domainName

I think ideally we should have a consistent interface similar to how the Connections interface works. Any construct that has an address on the internet should have an interface like MyConstruct.address, and that interface would have properties for fetching either a full URL, or just a domain name, or the port, etc. Right now I have to learn for each construct what the property is which that construct uses to expose its address on the internet.

This would be in addition to the raw native attributes from CloudFormation, just a higher level interface that makes it easier to get the address of whatever construct you just created.

nathanpeck avatar Feb 25 '19 16:02 nathanpeck

Hi @nathanpeck,

Sorry that this has been left so long with no response. This has not been forgotten, and is still on the long-term to-do. If you would like to see this more urgently, feel free to put in a PR. Otherwise someone will update this issue when the status changes!

😸

NGL321 avatar Oct 14 '19 18:10 NGL321

Marking this RFCs as stale since there has been little recent activity and it is not currently close to getting accepted as-is. We appreciate the effort that has gone into this proposal. Marking an RFCs as stale is not a one-way door. If you have made substantial changes to the proposal, please open a new issue/RFC. You might also consider raising a PR to aws/aws-cdk directly or self-publishing to Construct Hub.

mrgrain avatar Oct 27 '23 11:10 mrgrain