Use this data source to get DNS ns records of the host.
data "dns_ns_record_set" "google" { host = "google.com" } output "google_nameservers" { value = "${join(",", data.dns_ns_record_set.google.nameservers)}" }
The following arguments are supported:
host
- (required): Host to look up The following attributes are exported:
id
- Set to host
.
nameservers
- A list of nameservers. Nameservers are always sorted to avoid constant changing plans.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/dns/d/dns_ns_record_set.html