Raffael
Raffael

Reputation: 20045

STANDARD network tier is not supported for global address

I'd like to add an A-type DNS name on GCP with the following Terraform code:

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"
}
*/

(The out commented part is not causing the error but maybe relevant as it shows more info about what I want to achieve)

But this yields the following error message ...

...
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

... for which I can't find more information. Does somebody have an idea how to solve this?

What I find confusing is that there are A-level entries added and my terraform code is c/p'ed from their corresponding tf code (+ adjustment of names).

Upvotes: 1

Views: 931

Answers (1)

guillaume blaquiere
guillaume blaquiere

Reputation: 75940

The Standard Network Tier doesn't use the Google global fiber network and use the "standard internet", locally to the region. If you use global address, the address is globally reachable and thus you need to use the premium network tier to access to this feature.

more details here

In your case, you have to update the project configuration to Premium Network Tier. You can achieve this with Terraform

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

Upvotes: 3

Related Questions