Closed mattt416 closed 4 years ago
Thank you @mattt416. This is indeed a bug and in my own testing I've discovered a few more challenges with the shared Atlas tiers, that is M2/M5s, that I am adding here. The shared tier (TENANT) presents a specific set of challenges in that is it so very different than M10s and above in many of the API configuration options (documented here: https://docs.atlas.mongodb.com/reference/free-shared-limitations/ )
The following config will work to create an M2/M5, comments call out challenges/issues:
`resource "mongodbatlas_cluster" "test" { name = "testCluster" project_id = mongodbatlas_project.my_project.id
provider_name = "TENANT" backing_provider_name = "AWS" provider_region_name = "US_EAST_1" provider_instance_size_name = "M2" //disk_size_gb is required but should not be as it is a fixed number, it should either //be optional or, in order for it to work with upgrades, only accept the default values. disk_size_gb = "2" //version should be optional mongo_db_major_version = "4.2" //You can't auto scale storage with the shared tier so this always must be false //so should not be required. All the shared/ auto_scaling_disk_gb_enabled = "false" }`
I then tried to upgrade from an M2 to an M10, this caused the M2 to either be destroyed or the upgrade failed.
@marinsalinas and @PacoDw fyi we'll need to add this to our list of bugs to address. We'll need to ensure we can create a M2/M5 with only with applicable arguments (cannot update an M2 or M5 via API, going to update doc to reflect this.) Could still improve the variables required though.
Hi team,
The M2/M5 tiers have fixed disk storage, 2 GB for M2 and 5 GB for M5.
If I add any arbitrary
disk_size_gb
value to my M2/M5 config, the build goes through without issue.However, after the build completes and I attempt to re-apply, I receive the following failure:
This is because the
re-apply
tries to change thedisk_size_gb
from what it ought to be to what I've configured:Would it make sense to enforce the correct
disk_size_gb
values for M2/M5 up front to prevent this from occurring?Thanks, Matt