mongodb / terraform-provider-mongodbatlas

Terraform MongoDB Atlas Provider: Deploy, update, and manage MongoDB Atlas infrastructure as code through HashiCorp Terraform
https://registry.terraform.io/providers/mongodb/mongodbatlas
Mozilla Public License 2.0
238 stars 167 forks source link

An invalid enumeration value US_EAST_1 was specified. #49

Closed mattdornfeld closed 4 years ago

mattdornfeld commented 4 years ago

Can anyone explain why I'm getting the below error?

Error: error creating MongoDB Cluster: POST https://cloud.mongodb.com/api/atlas/v1.0/groups/5d9d6380014b76f54c449b2b/clusters: 400 (request "Bad Request") An invalid enumeration value US_EAST_1 was specified.

This is my tf file

resource "mongodbatlas_project" "project" {
    name   = "project"
    org_id = "${var.mongodb_atlas_organization_id}"
}

resource "mongodbatlas_cluster" "cluster" {
  project_id   = "${mongodbatlas_project.project.id}"
  name         = "cluster"

  cluster_type                 = "REPLICASET"
  replication_factor           = 3
  backup_enabled               = true
  auto_scaling_disk_gb_enabled = true
  mongo_db_major_version       = "4.0"

  provider_instance_size_name = "M10"
  provider_name               = "GCP"
  disk_size_gb                = 10
  provider_region_name        = "US_EAST_1"
}
hpio commented 4 years ago

hi @mattdornfeld, you are getting this error as you used incorect value for provider_region_name. Please have a look at https://docs.atlas.mongodb.com/reference/google-gcp/ and pick a valid Atlas Region

themantissa commented 4 years ago

Thank you @hpio for the assist!