aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.59k stars 3.89k forks source link

route53: Cname domainName vs recordName ambiguous #25552

Closed mdavis-xyz closed 1 year ago

mdavis-xyz commented 1 year ago

Describe the issue

For route53.CnameRecord, the argument domainName has definition:

The domain name.

The argument recordName has definition:

The domain name for this record.

That's the same definition. It's not clear which is which. The only difference is "for this record", but both the target and the alias domain names are associated with this record. And I expect both of those to be required.

Even once I figure out which argument is which, it's still ambiguous whether I need to pass "myhost" or "myhost.mydomain.com" (i.e. myhost.${zone.zoneName}).

After trying a few things, I think I've figured out the behavior. I think domainName should be defined as:

The domain name of the target that this record points to.

(Or to align with the service's terminology, we can call this the "value".)

and recordName should be redefined as

The subdomain name that for this record, which is for the domain that DNS clients will submit the query against.

Links

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_route53.CnameRecord.html

pahud commented 1 year ago

Yes this is very ambiguous now and we should improve the construct doc. Are you interested to submit a PR for that?

github-actions[bot] commented 1 year ago

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