From 80493af9abbee794a4c8529b9a54f7aeff1b88e7 Mon Sep 17 00:00:00 2001 From: Dosty Everts Date: Thu, 10 Nov 2022 10:40:05 -0600 Subject: [PATCH] INTMDB-438 ForceNew on cluster name change (#902) * Added ForceNew for name on Cluster * Updated documentation to include information on name changes for cluster --- mongodbatlas/resource_mongodbatlas_cluster.go | 1 + website/docs/r/advanced_cluster.html.markdown | 2 +- website/docs/r/cluster.html.markdown | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mongodbatlas/resource_mongodbatlas_cluster.go b/mongodbatlas/resource_mongodbatlas_cluster.go index adaa581a3a..c3ead4c2f7 100644 --- a/mongodbatlas/resource_mongodbatlas_cluster.go +++ b/mongodbatlas/resource_mongodbatlas_cluster.go @@ -131,6 +131,7 @@ func resourceMongoDBAtlasCluster() *schema.Resource { "name": { Type: schema.TypeString, Required: true, + ForceNew: true, }, "mongo_db_major_version": { Type: schema.TypeString, diff --git a/website/docs/r/advanced_cluster.html.markdown b/website/docs/r/advanced_cluster.html.markdown index fc948fb661..8fc5f10010 100644 --- a/website/docs/r/advanced_cluster.html.markdown +++ b/website/docs/r/advanced_cluster.html.markdown @@ -130,7 +130,7 @@ resource "mongodbatlas_advanced_cluster" "test" { ## Argument Reference * `project_id` - (Required) Unique ID for the project to create the database user. -* `name` - (Required) Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed. +* `name` - (Required) Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed. **WARNING** Changing the name will result in destruction of the existing cluster and the creation of a new cluster. * `cluster_type` - (Required) Atlas provides different instance sizes, each with a default storage capacity and RAM size. The instance size you select is used for all the data-bearing servers in your cluster. See [Create a Cluster](https://docs.atlas.mongodb.com/reference/api/clusters-create-one/) `providerSettings.instanceSizeName` for valid values and default resources. * `backup_enabled` - (Optional) Flag that indicates whether the cluster can perform backups. diff --git a/website/docs/r/cluster.html.markdown b/website/docs/r/cluster.html.markdown index e3327291d7..9ea2c64393 100644 --- a/website/docs/r/cluster.html.markdown +++ b/website/docs/r/cluster.html.markdown @@ -275,7 +275,7 @@ output "private_srv" { - `GCP` - Google Cloud Platform - `AZURE` - Microsoft Azure - `TENANT` - A multi-tenant deployment on one of the supported cloud service providers. Only valid when providerSettings.instanceSizeName is either M2 or M5. -* `name` - (Required) Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed. +* `name` - (Required) Name of the cluster as it appears in Atlas. Once the cluster is created, its name cannot be changed. **WARNING** Changing the name will result in destruction of the existing cluster and the creation of a new cluster. * `provider_instance_size_name` - (Required) Atlas provides different instance sizes, each with a default storage capacity and RAM size. The instance size you select is used for all the data-bearing servers in your cluster. See [Create a Cluster](https://docs.atlas.mongodb.com/reference/api/clusters-create-one/) `providerSettings.instanceSizeName` for valid values and default resources. * `auto_scaling_disk_gb_enabled` - (Optional) Specifies whether disk auto-scaling is enabled. The default is true.