I found this code snippet on official documentation of terraform but it doesnt show how to change rrdatas
into dynamic ip. anyone tried creating dns record set with dynamic ips?
resource "google_dns_record_set" "a" {
name = "backend.${google_dns_managed_zone.prod.dns_name}"
managed_zone = google_dns_managed_zone.prod.name
type = "A"
ttl = 300
rrdatas = ["8.8.8.8"]
}
Im a newbie on gcp and terraform
Google Cloud DNS does not support dynamic DNS.
Google Domains does support Dynamic DNS but does provide a Terraform provider. There is a simple API that you can use.
Dynamic DNS allows you to direct your domain or a subdomain to a resource that is behind a gateway that has a dynamically assigned IP address. Follow this link for DNS A record with dynamic ip and also can use cloudflare to set the Dynamic IP . You can find the code in GitHub .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.