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

CNAME data source fails if not resolvable to a host #171

Open
BrandonALXEllisSS opened this issue Oct 11, 2021 · 1 comment
Open

CNAME data source fails if not resolvable to a host #171

BrandonALXEllisSS opened this issue Oct 11, 2021 · 1 comment

Comments

@BrandonALXEllisSS
Copy link

Affected Resource(s)

dns_cname_record_set data source

Terraform Configuration Files

data "dns_cname_record_set" "record" {
  host = "some.cname.entry.that.exists.but.doesnt.resolve"
}

Output

Error: error looking up CNAME records for "some.cname.entry.that.exists.but.doesnt.resolve": lookup some.cname.entry.that.exists.but.doesnt.resolve on 172.28.16.1:53: no such host

Expected Behavior

Data source does not try to resolve CNAME entry and just returns the record

Actual Behavior

Data source retrieves CNAME entry and then tries to resolve it, ultimately failing

References

This is because the data source uses the go net provider's LookupCNAME function. And for some reason, this provider has this functionality. Consider changing this so that it makes sense please

@drdamour
Copy link

drdamour commented Apr 3, 2023

yeah the cname lookup should leverage https://godoc.org/github.com/miekg/dns the way it is now it doesn't even respect the dns server config in the provider, it just uses the host machines dns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants