We have been asked to create a process to pause/unpause MongoDB Clusters programmatically via Terraform. Does the current implementation in Terraform allow this
Otherwise, is there a clean way to do this via the API?
We have been asked to create a process to pause/unpause MongoDB Clusters programmatically via Terraform. Does the current implementation in Terraform allow this
Otherwise, is there a clean way to do this via the API?
Hi @Thomas_Tenner,
Welcome to the MongoDB Community!
Does the current implementation in Terraform allow this
Currently you will not be able to pause / unpause an Atlas cluster via terraform. I believe this may be due to unknowns of how the state file will handle the automatic resume of a paused cluster after 30 days in Atlas.
Otherwise, is there a clean way to do this via the API?
Have you tried using the Atlas API changing the paused
boolean value within the request body parameters to true (to pause) or false (to unpause)? The documents do note the following in regards to pausing / paused clusters:
You can’t modify a
paused
cluster other than to resume the cluster. Nor can you pause a cluster with pending changes.
Hope this helps.
Kind Regards,
Jason
Just a quick update - Version 1.2.0 of the mongodbatlas
provider now has the paused
option available for the mongodbatlas_cluster
resource. Please view the terraform documentation for more details regarding this.
Regards,
Jason
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.