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

Fixed an issue when importing Route53 Records with underscores #21556

Merged
merged 7 commits into from
Jan 8, 2022

Conversation

jdeschenes
Copy link
Contributor

@jdeschenes jdeschenes commented Oct 30, 2021

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

There is an issue when a DNS record contains an underscore. This problem occurred when trying to import a DNS Record for a DKIM record of Microsoft 365. Here is an example from Microsoft Link

*._domainkey.SubDomainThatShouldntSendMail.contoso.com. TXT "v=DKIM1; p="

In my particular case, the DNS entries that needed to be imported looked like this:

selector1._domainkey.contoso.com.
selector2._domainkey.contoso.com.

The problem was solved for the case where the underscore was the first character of the DNS Name but did not validate when the underscore was somewhere else in the Name.

Closes #16213

Output from acceptance testing: N/A

Let me know if there is something to adjust.

* There is an issue when a DNS record contains an underscore. The
  problem was solved for the case where the underscore was the first
  character of the DNS Name but did not validate when the underscore
  was somewhere else in the Name. This problem occurred when trying to
  import a DNS Record for a DKIM record of Microsoft 365.
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. service/route53 Issues and PRs that pertain to the route53 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 30, 2021
@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Oct 30, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @jdeschenes 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 2, 2021
Copy link

@DragonStuff DragonStuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this! Just ran into this today with my team.

@gdavison gdavison self-assigned this Dec 3, 2021
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Jan 8, 2022
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @jdeschenes, it looks good. 🚀

I've added a couple test cases and made a few tweaks

Acceptance test results

--- PASS: TestAccRoute53Record_Weighted_basic (203.10s)
--- PASS: TestAccRoute53Record_doNotAllowOverwrite (204.66s)
--- PASS: TestAccRoute53Record_basic (210.39s)
--- PASS: TestAccRoute53Record_Alias_elb (217.45s)
--- PASS: TestAccRoute53Record_longTXTrecord (233.64s)
--- PASS: TestAccRoute53Record_empty (233.75s)
--- PASS: TestAccRoute53Record_generatesSuffix (234.57s)
--- PASS: TestAccRoute53Record_Alias_s3 (235.16s)
--- PASS: TestAccRoute53Record_failover (240.53s)
--- PASS: TestAccRoute53Record_dsSupport (244.50s)
--- PASS: TestAccRoute53Record_Latency_basic (252.93s)
--- PASS: TestAccRoute53Record_MultiValueAnswer_basic (256.58s)
--- PASS: TestAccRoute53Record_allowOverwrite (258.53s)
--- PASS: TestAccRoute53Record_setIdentifierChange (305.28s)
--- PASS: TestAccRoute53Record_typeChange (317.00s)
--- PASS: TestAccRoute53Record_aliasChange (320.10s)
--- PASS: TestAccRoute53Record_wildcard (320.61s)
--- PASS: TestAccRoute53Record_WeightedToSimple_basic (323.00s)
--- PASS: TestAccRoute53Record_nameChange (354.95s)
--- PASS: TestAccRoute53Record_Geolocation_basic (163.93s)
--- PASS: TestAccRoute53Record_Alias_uppercase (145.51s)
--- PASS: TestAccRoute53Record_caaSupport (146.74s)
--- PASS: TestAccRoute53Record_Basic_trailingPeriodAndZoneID (155.58s)
--- PASS: TestAccRoute53Record_spfSupport (156.73s)
--- PASS: TestAccRoute53Record_disappears (135.70s)
--- PASS: TestAccRoute53Record_txtSupport (152.53s)
--- PASS: TestAccRoute53Record_underscored (162.50s)
--- PASS: TestAccRoute53Record_Basic_fqdn (170.53s)
--- PASS: TestAccRoute53Record_HealthCheckID_typeChange (222.80s)
--- PASS: TestAccRoute53Record_Disappears_multipleRecords (191.33s)
--- PASS: TestAccRoute53Record_HealthCheckID_setIdentifierChange (274.05s)
--- PASS: TestAccRoute53Record_Weighted_alias (312.35s)
--- PASS: TestAccRoute53Record_Alias_vpcEndpoint (601.62s)

@gdavison gdavison merged commit 17c2ca6 into hashicorp:main Jan 8, 2022
@github-actions github-actions bot added this to the v3.72.0 milestone Jan 8, 2022
@github-actions
Copy link

This functionality has been released in v3.72.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/route53 Issues and PRs that pertain to the route53 service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform import aws_route53_record fails if identifier has an underscore
5 participants