terraform-provider-mongodbatlas: INVALID_CLUSTER_CONFIGURATION when adding new regions
Terraform CLI and Terraform MongoDB Atlas Provider Version
Terraform v1.0.5 on darwin_amd64
mongo provider: 1.0.0
Terraform Output
Terraform will perform the following actions:
# mongodbatlas_cluster.runtime will be updated in-place
~ resource "mongodbatlas_cluster" "runtime" {
id = "********"
name = "prod"
# (31 unchanged attributes hidden)
- replication_specs {
- id = "******" -> null
- num_shards = 1 -> null
- zone_name = "Zone 1" -> null
- regions_config {
- analytics_nodes = 0 -> null
- electable_nodes = 3 -> null
- priority = 7 -> null
- read_only_nodes = 0 -> null
- region_name = "EUROPE_WEST_4" -> null
}
}
+ replication_specs {
+ id = (known after apply)
+ num_shards = 1
+ zone_name = "Zone 1"
+ regions_config {
+ analytics_nodes = 0
+ electable_nodes = 0
+ priority = 0
+ read_only_nodes = 2
+ region_name = "SOUTHEASTERN_ASIA_PACIFIC"
}
+ regions_config {
+ analytics_nodes = 0
+ electable_nodes = 3
+ priority = 7
+ read_only_nodes = 0
+ region_name = "EUROPE_WEST_4"
}
}
# (2 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
mongodbatlas_cluster.runtime: Modifying... [id=****]
╷
│ Error: error updating MongoDB Cluster (runtime-prod): PATCH https://cloud.mongodb.com/api/atlas/v1.0/groups/*******/clusters/prod: 400 (request "INVALID_CLUSTER_CONFIGURATION") The specified cluster configuration is not valid.
│
│ with mongodbatlas_cluster.runtime,
│ on main.tf line 23, in resource "mongodbatlas_cluster" "runtime":
│ 23: resource "mongodbatlas_cluster" "runtime" {
│
Steps to Reproduce
- Create a replicaset cluster
- Add a new read only region replica
Expected Behavior
New replica is added to the cluster or a meaningful error message appears
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 15
I had same issue. Version 1.0.2 works perfect. Thanks
This issue was resolve. Because I set the wrong region (AP-SOUTHEAST-1). It should be used underscore (_) to replace the dash (-).
@slamdev I will pass on to the team the request for better error messaging. This is still not enough to determine why you are hitting an issue as nothing here is jumping out as a problem. If you can include the full config and logs that may help or reach out to support to be able to provide that via our ticketing system. @nikhil-mongo can you respond if more information comes in?