简体   繁体   English

如何使用动态 IP 在谷歌云平台创建记录集?

[英]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.

相关问题 如何在谷歌云平台(GCP)中创建组织下的文件夹? - How to create folders under the organization in Google Cloud Platform (GCP)? 如何使用 terraform 在 Google Cloud Platform 中创建松弛通知通道 - How to create a slack notification channel in Google Cloud Platform with terraform 如何从我的电脑连接到谷歌云平台中私有 ip 的 sql 实例 - How to connect from my pc to sql instance with private ip in google cloud platform 如何在Google Cloud Platform中安装Google AI Platform中的Spark依赖 - How to install Spark dependencies in Google AI Platform in Google Cloud Platform 如何禁用谷歌云平台集成? - How to disable Google Cloud Platform integration? 谷歌云平台 HTTPS - Google Cloud Platform HTTPS 谷歌云平台中的身份验证 - Authentication in Google Cloud Platform 如何在 Google Cloud Platform CLI 中的配置之间切换 - Cloud Shell - How to Switch between Configurations in Google Cloud Platform CLI - Cloud Shell 谷歌云平台 - mySQL 访问被公共 IP 的计算引擎实例拒绝 - google cloud platform - mySQL access denied from compute engine instance with public IP 是否可以使用公共 IP 将 WordPress 网站(托管在 GoDaddy 上)连接到 Google Cloud Platform 实例? - Is it possible to connect WordPress Website (hosted on GoDaddy) to Google Cloud Platform Instance using Public IP?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM