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

aws_route53_record strips trailing dots from FQDNs #11147

Open
BBauman opened this issue Dec 4, 2019 · 4 comments
Open

aws_route53_record strips trailing dots from FQDNs #11147

BBauman opened this issue Dec 4, 2019 · 4 comments
Labels
bug Addresses a defect in current functionality. service/route53 Issues and PRs that pertain to the route53 service.

Comments

@BBauman
Copy link

BBauman commented Dec 4, 2019

AWS presumes that all domains in Route53 are fully qualified, and thus a somewhere.com record is functionally equivalent to a somewhere.com. record. However, AWS will still retain the trailing dot if the user configures one, as demonstrated:

aws route53 list-resource-record-sets --hosted-zone-id (my-zone)
{
    "ResourceRecordSets": [
        {
            "Name": "(domain-with-trailing-dot)",
            "Type": "A",
            "TTL": 300,
            "ResourceRecords": [
                {
                    "Value": "(someIP)"
                }
            ]
        }
        ...
    ]
}

The Terraform AWS provider, however, will strip the trailing dot from any aws_route53_record name and fqdn field, both incoming (data) and outgoing (resources). For example:

resource "aws_route53_record" "dummy" {
  zone_id = (my-zone)
  name = "someurl.com."
  type = "A"
}

terraform plan

Terraform will perform the following actions:

  # module.admin-dns.aws_route53_record.dummy will be created
  + resource "aws_route53_record" "dummy" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "someurl.com"
      + type            = "A"
      + zone_id         = "(my-zone)"
    }

The fact that AWS treats all records as fully-qualified shouldn't matter to Terraform. Since AWS supports including or not including a trailing dot, Terraform should faithfully transmit the information as submitted. Similarly, Terraform should faithfully report the information as it exists in AWS, instead of removing the trailing dot as it does now.

Possibly related issues:
hashicorp/terraform#8511
#241
#1031

@ghost ghost added the service/route53 Issues and PRs that pertain to the route53 service. label Dec 4, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 4, 2019
@justinretzolk
Copy link
Member

Hey @BBauman 👋 Thank you for taking the time to file this issue. Given that there's been a number of AWS provider releases since you initially filed it, can you confirm whether you're still experiencing this behavior?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 18, 2021
@BBauman
Copy link
Author

BBauman commented Jan 3, 2022

Hey @BBauman 👋 Thank you for taking the time to file this issue. Given that there's been a number of AWS provider releases since you initially filed it, can you confirm whether you're still experiencing this behavior?

The above repro steps continue to demonstrate the behavior at least through provider release 3.46.0.

@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Jan 3, 2022
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Jan 13, 2022
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Nov 24, 2024
@Brian-Bauman
Copy link

Still relevant.

@github-actions github-actions bot removed the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/route53 Issues and PRs that pertain to the route53 service.
Projects
None yet
Development

No branches or pull requests

3 participants