terraform-provider-mongodbatlas icon indicating copy to clipboard operation
terraform-provider-mongodbatlas copied to clipboard

Resizing a M0,M2 or M5 mongo cluster fails

Open akshaykarle opened this issue 7 years ago • 2 comments

Changing the size of MongoDB Atlas cluster of sizes M0, M2 or M5 fails with the following error:

mongodbatlas_cluster.test: Modifying... (ID: xxxxxx)
  size: "M2" => "M0"

Error: Error applying plan:

1 error(s) occurred:

* mongodbatlas_cluster.test: 1 error(s) occurred:

* mongodbatlas_cluster.test: Error reading MongoDB Cluster test: MongoDB Atlas: 400 Cannot update a M0/M2/M5 cluster through the public API.

The MongoDB Atlas API doesn't allow updating these clusters. This Free tier limitation of the API could be dealt by marking the cluster resource as tainted using terraform taint and rerunning terraform apply for now until there is a better way to implement this case of updating cluster.

There maybe a way to force the mongodbatlas_cluster resource's update to ForceNew making it to recreate the cluster, but will investigate this when I get some free time.

akshaykarle avatar Mar 27 '18 01:03 akshaykarle

How did you even managed to use M0? For me it fails even to create cluster with such size.

holms avatar Dec 04 '18 05:12 holms