Skip to content

Commit bfc18aa

Browse files
authored
doc: Updates mongodbatlas_global_cluster_config doc about self-managed sharding clusters (#2372)
* update doc * add link
1 parent f6de3c7 commit bfc18aa

File tree

1 file changed

+2
-45
lines changed

1 file changed

+2
-45
lines changed

website/docs/r/global_cluster_config.html.markdown

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ description: |-
1313

1414
-> **NOTE:** Groups and projects are synonymous terms. You may find group_id in the official documentation.
1515

16+
-> **NOTE:** This resource can only be used with Atlas-managed clusters. See doc for `global_cluster_self_managed_sharding` attribute in [`mongodbatlas_advanced_cluster` resource](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/advanced_cluster) for more info.
17+
1618
~> **IMPORTANT:** A Global Cluster Configuration, once created, can only be deleted. You can recreate the Global Cluster with the same data only in the Atlas UI. This is because the configuration and its related collection with shard key and indexes are managed separately and they would end up in an inconsistent state. [Read more about Global Cluster Configuration](https://www.mongodb.com/docs/atlas/global-clusters/)
1719

1820
## Examples Usage
@@ -72,51 +74,6 @@ description: |-
7274
}
7375
```
7476

75-
### Example Global cluster config
76-
77-
```terraform
78-
resource "mongodbatlas_cluster" "cluster-test" {
79-
project_id = "<YOUR-PROJECT-ID>"
80-
name = "cluster-test"
81-
82-
cluster_type = "REPLICASET"
83-
replication_specs {
84-
num_shards = 1
85-
regions_config {
86-
region_name = "US_EAST_1"
87-
electable_nodes = 3
88-
priority = 7
89-
read_only_nodes = 0
90-
}
91-
}
92-
93-
backup_enabled = true
94-
auto_scaling_disk_gb_enabled = true
95-
mongo_db_major_version = "7.0"
96-
97-
//Provider Settings "block"
98-
provider_name = "AWS"
99-
provider_instance_size_name = "M40"
100-
}
101-
102-
resource "mongodbatlas_global_cluster_config" "config" {
103-
project_id = mongodbatlas_cluster.test.project_id
104-
cluster_name = mongodbatlas_cluster.test.name
105-
106-
managed_namespaces {
107-
db = "mydata"
108-
collection = "publishers"
109-
custom_shard_key = "city"
110-
}
111-
112-
custom_zone_mappings {
113-
location = "CA"
114-
zone = "Zone 1"
115-
}
116-
}
117-
```
118-
119-
12077
## Argument Reference
12178

12279
* `project_id` - (Required) The unique ID for the project to create the database user.

0 commit comments

Comments
 (0)