terraform-provider-mongodbatlas
terraform-provider-mongodbatlas copied to clipboard
Resizing a M0,M2 or M5 mongo cluster fails
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.
How did you even managed to use M0? For me it fails even to create cluster with such size.