Kristian
Kristian

Reputation: 33

Error: googleapi: Error 400: The specified location constraint is not valid., invalid

I am getting the following error when trying to use Terraform to create a new GCP Project and Create a Bucket - Error: googleapi: Error 400: The specified location constraint is not valid., invalid │ │ with google_storage_bucket.project-data, │ on storage.tf line 5, in resource "google_storage_bucket" "project-data": │ 5: resource "google_storage_bucket" "project-data" {

This is the bucket code

resource "google_storage_bucket" "project-data" {
  depends_on    = [google_project_service.storage-component_api]
  project       = google_project.project.project_id
  name          = join("", [google_project.project.project_id, "-project-data"])
  location      = "us-center1"
  storage_class = "REGIONAL"
}

Tried to change the name, added storage class, searched trough the internet but found nothing...

Upvotes: 1

Views: 5959

Answers (1)

Guillermo Alvarado
Guillermo Alvarado

Reputation: 101

In a quick glance, you are specifying a location that does not exist. You have to use a valid location.I assume you meant US-CENTRAL1

Upvotes: 2

Related Questions