[英]How to create a record set in google cloud platform with dynamic IP?
I found this code snippet on official documentation of terraform but it doesnt show how to change rrdatas
into dynamic ip.我在 terraform 的官方文档中找到了这个代码片段,但它没有显示如何将
rrdatas
更改为动态 ip。 anyone tried creating dns record set with dynamic ips?有人尝试使用动态 ips 创建 dns 记录集吗?
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我是 gcp 和 terraform 的新手
Google Cloud DNS does not support dynamic DNS. Google Cloud DNS不支持动态 DNS。
Google Domains does support Dynamic DNS but does provide a Terraform provider. Google Domains确实支持动态 DNS,但确实提供了 Terraform 提供程序。 There is a simple API that you can use.
您可以使用一个简单的 API 。
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.动态 DNS 允许您将域或子域定向到网关后面的资源,该网关具有动态分配的 IP 地址。 Follow this link for DNS A record with dynamic ip and also can use cloudflare to set the Dynamic IP .
按照此链接获取具有动态 ip 的 DNS 记录,也可以使用 cloudflare设置动态 IP 。 You can find the code in GitHub .
您可以在GitHub中找到代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.