From adfa644ce18c2d3a5fe6d8ed6e040a82dc7698d6 Mon Sep 17 00:00:00 2001 From: Leo Antoli <430982+lantoli@users.noreply.github.com> Date: Thu, 27 Jun 2024 13:08:44 +0200 Subject: [PATCH 1/2] update doc --- .../r/global_cluster_config.html.markdown | 47 +------------------ 1 file changed, 2 insertions(+), 45 deletions(-) diff --git a/website/docs/r/global_cluster_config.html.markdown b/website/docs/r/global_cluster_config.html.markdown index 46fd14fe6c..05f48e56bd 100644 --- a/website/docs/r/global_cluster_config.html.markdown +++ b/website/docs/r/global_cluster_config.html.markdown @@ -13,6 +13,8 @@ description: |- -> **NOTE:** Groups and projects are synonymous terms. You may find group_id in the official documentation. +-> **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 for more info. + ~> **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/) ## Examples Usage @@ -72,51 +74,6 @@ description: |- } ``` -### Example Global cluster config - -```terraform -resource "mongodbatlas_cluster" "cluster-test" { - project_id = "" - name = "cluster-test" - - cluster_type = "REPLICASET" - replication_specs { - num_shards = 1 - regions_config { - region_name = "US_EAST_1" - electable_nodes = 3 - priority = 7 - read_only_nodes = 0 - } - } - - backup_enabled = true - auto_scaling_disk_gb_enabled = true - mongo_db_major_version = "7.0" - - //Provider Settings "block" - provider_name = "AWS" - provider_instance_size_name = "M40" -} - -resource "mongodbatlas_global_cluster_config" "config" { - project_id = mongodbatlas_cluster.test.project_id - cluster_name = mongodbatlas_cluster.test.name - - managed_namespaces { - db = "mydata" - collection = "publishers" - custom_shard_key = "city" - } - - custom_zone_mappings { - location = "CA" - zone = "Zone 1" - } -} -``` - - ## Argument Reference * `project_id` - (Required) The unique ID for the project to create the database user. From 2956b05a1cc05a3f35b4dff39276e7c58074cbf4 Mon Sep 17 00:00:00 2001 From: Leo Antoli <430982+lantoli@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:10:38 +0200 Subject: [PATCH 2/2] add link --- website/docs/r/global_cluster_config.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/global_cluster_config.html.markdown b/website/docs/r/global_cluster_config.html.markdown index 05f48e56bd..18fe29f942 100644 --- a/website/docs/r/global_cluster_config.html.markdown +++ b/website/docs/r/global_cluster_config.html.markdown @@ -13,7 +13,7 @@ description: |- -> **NOTE:** Groups and projects are synonymous terms. You may find group_id in the official documentation. --> **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 for more info. +-> **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. ~> **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/)