Use this data source to get DNS TXT record set of the host.
data "dns_txt_record_set" "hashicorp" {
host = "www.hashicorp.com"
}
output "hashi_txt" {
value = data.dns_txt_record_set.hashicorp.record
}
output "hashi_txts" {
value = join(",", data.dns_txt_record_set.hashicorp.records)
}
host
(String) Host to look up.id
(String) Always set to the host.record
(String) The first TXT record.records
(List of String) A list of TXT records.