【问题标题】:STANDARD network tier is not supported for global address全局地址不支持标准网络层
【发布时间】:2021-05-27 22:03:09
【问题描述】:

我想使用以下 Terraform 代码在 GCP 上添加一个 A 型 DNS 名称:

data "google_dns_managed_zone" "env_dns_zone" {
  name = "env-zone"
}

resource "google_compute_global_address" "argo_events_webhook" {
  name = "argo-events-webhook"
}

/*
resource "google_dns_record_set" "argo-events-webhook" {
  name         = "argo-events-webhook.${data.google_dns_managed_zone.env_dns_zone.dns_name}"
  managed_zone = data.google_dns_managed_zone.env_dns_zone.name
  rrdatas      = [google_compute_global_address.argo_events_webhook.address]
  ttl          = 600
  type         = "A"
}
*/

(注释掉的部分不会导致错误,但可能相关,因为它显示了有关我想要实现的更多信息)

但这会产生以下错误消息...

...
module.gke.google_compute_global_address.argo_events_webhook: Creating...

Error: Error creating GlobalAddress: googleapi: Error 400: STANDARD network tier (the project's default network tier) is not supported: STANDARD network tier is not supported for global address., badRequest

...我找不到更多信息。有人知道如何解决这个问题吗?

让我感到困惑的是,添加了 A 级条目,并且我的 terraform 代码是从它们相应的 tf 代码中 c/p'ed 的(+ 名称调整)。

【问题讨论】:

    标签: google-cloud-platform terraform terraform-provider-gcp


    【解决方案1】:

    标准网络层不使用 Google 全球光纤网络,而是使用该地区本地的“标准互联网”。如果您使用全局地址,则该地址是全局可访问的,因此您需要使用高级网络层才能访问此功能。

    更多详情here

    在您的情况下,您必须更新 the project configuration to Premium Network Tier。你可以通过Terraform实现这个目标

    resource "google_compute_project_default_network_tier" "default" {
      network_tier = "PREMIUM"
    }
    

    【讨论】:

    • 这确实是必需的步骤。我与网络管理员交谈,他确认这是必要的。由于某些原因,网络层设置为标准(高级引起的问题),为此我必须暂时切换到高级。我觉得这有点令人困惑。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-06-23
    • 2010-12-22
    • 2012-04-18
    • 2021-05-02
    • 2012-01-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多