-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(RecordSet): recordName with a token do not suffix with zone name #26597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will happen to a customer currently successfully using a tokenized value as input to this construct (because they know the behavior and they're only passing the subdomain name) ?
It's a fair point but hear me out:
The options I see are:
|
@rix0rrr Friendly ping. Which option do you prefer? In summary, I would propose the PR as is; yes it will break existing customers, but:
|
The pull request linter fails with the following errors:
PRs must pass status checks before we can provide a meaningful review. If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Closing due to inactivity |
Closes #26572.
Context
RecordSet
attempts to be smart about the input value ofrecordName
. Typically, for a zoneexample.com
, a FQDN is required for therecordName
such astest.example.com.
. However, RecordSet'sdetermineFullyQualifiedDomainName
method attempts to fix user input in case they forgot to add the zone name turningtest
intotest.example.com
. This works great in the usual cases, except for parameterized input such as CfnCondition or imported value from another stack. ThedetermineFullyQualifiedDomainName
thinks the input does not end in the zone name and tacks it on. Whentest.example.com.
is passed in via CfnParameter, the resulting record becomestest.example.com.example.com
.Solution
If the
recordName
(a.k.a.providedName
insidedetermineFullyQualifiedDomainName
) is found to contain a token, leave the input as is and do not suffix it with zone name. This is because the input should have been a FQDN in the first place. So we assume the token includes the correct FQDN as required since we are not able to confirm ourselves.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license