Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider try to update M2/M5 even without changes #110

Open
ezavgorodniy opened this issue Jan 29, 2020 · 2 comments
Open

Provider try to update M2/M5 even without changes #110

ezavgorodniy opened this issue Jan 29, 2020 · 2 comments

Comments

@ezavgorodniy
Copy link

Hello,

If I'm running terraform apply twice with this resource

resource "mongodbatlas_cluster" "lcm" {
project_id = "my-project"
name = "cluster-my"
num_shards = 1

mongo_db_major_version = "4.0"
backup_enabled = false
auto_scaling_disk_gb_enabled = false

//Provider Settings "block"
provider_name = "TENANT"
backing_provider_name = "AZURE"
provider_instance_size_name = "M2"
provider_region_name = "EUROPE_NORTH"
disk_size_gb = 10
}

First it will create the resource, but second time it will show error message

Error: error updating MongoDB Cluster (cluster-yelocal-cloud-lcm): PATCH https://cloud.mongodb.com/api/atlas/v1.0/groups/5e0f1fadcf09a21c829808a9/clusters/cluster-yelocal-cloud-lcm: 400 (request "Bad Request") Cannot update a M0/M2/M5 cluster through the public API.

@ezavgorodniy
Copy link
Author

As workaround I may change disk_size_gb to 2 for M2 and 5 for M5 but I think it shouldn't even allow me to set disk_size_gb for M2 and M5 cluster (I needed to set it due to getting an error message "The cluster's disk size of 0.0 GB is invalid. The disk size must be a positive whole number."

@themantissa
Copy link
Contributor

Hi @ezavgorodniy , We now have an official MongoDB version of the provider hosted within Terraform's GitHub repo - https://github.com/terraform-providers/terraform-provider-mongodbatlas and the config above looks like you may be using that version. I've recently updated the doc to be a bit more clear about M2/M5s and that will launch at the Terraform website very soon. We also will improve the way this works as we mature the Provider. Thank you for the feedback and feel free to add it at https://github.com/terraform-providers/terraform-provider-mongodbatlas/issues as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants