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
244 stars 172 forks source link

Set mongodb_major_version with tenant #2800

Open MonicaMagoniCom opened 13 hours ago

MonicaMagoniCom commented 13 hours ago

Is there an existing issue for this?

Provider Version

1.21.4

Terraform Version

1.9.8

Terraform Edition

Terraform Open Source (OSS)

Current Behavior

I'm trying to create a MongoDB Atlas cluster with GCP and with M5 instances and I would like to specify the mongoDB version. But from terraform apply I get: mongoDBMajorVersion is read-only for tenant clusters

Terraform configuration to reproduce the issue

resource "mongodbatlas_advanced_cluster" "test" {
  project_id   = mongodbatlas_project.mongodb-project.id
  name         = var.project
  cluster_type = "REPLICASET"
  replication_specs {
    region_configs {
      electable_specs {
        instance_size = "M5"
        node_count    = 3
      }
      provider_name = "TENANT"
      backing_provider_name = "GCP"
      priority      = 7
      region_name   = "WESTERN_EUROPE"
    }
  }
  mongo_db_major_version = "6"
  backup_enabled = false
}

Steps To Reproduce

terraform apply

Logs

error creating advanced cluster:  POST: HTTP 400 Bad Request (Error code: "TENANT_ATTRIBUTE_READ_ONLY") Detail: The attribute mongoDBMajorVersion is read-only for tenant clusters and cannot be changed by the user. Reason: Bad Request. Params: [mongoDBMajorVersion]

Code of Conduct

github-actions[bot] commented 13 hours ago

Thanks for opening this issue! Please make sure you've followed our guidelines when opening the issue. In short, to help us reproduce the issue we need:

The ticket CLOUDP-284605 was created for internal tracking.