Use this data source to get DNS CNAME record set of the host.
data "dns_cname_record_set" "hashicorp" {
host = "www.hashicorp.com"
}
output "hashi_cname" {
value = data.dns_cname_record_set.hashicorp.cname
}
host
(String) Host to look up.cname
(String) A CNAME record associated with host.id
(String) Always set to the host.