From 29c15a357fe14ddd72d600dcd3a3c09dbacad757 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 7 May 2024 14:16:51 -0700 Subject: [PATCH] Remove cluster update validation for primary to secondary (#10588) (#7326) [upstream:29ad7f672bb64f621878f757096e759bfedae0b7] Signed-off-by: Modular Magician --- google-beta/services/alloydb/resource_alloydb_cluster.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/google-beta/services/alloydb/resource_alloydb_cluster.go b/google-beta/services/alloydb/resource_alloydb_cluster.go index a4fe061a59..611b596f2d 100644 --- a/google-beta/services/alloydb/resource_alloydb_cluster.go +++ b/google-beta/services/alloydb/resource_alloydb_cluster.go @@ -1166,11 +1166,6 @@ func resourceAlloydbClusterUpdate(d *schema.ResourceData, meta interface{}) erro if err != nil { return err } - // Restrict modification of cluster_type from PRIMARY to SECONDARY as it is an invalid operation - if d.HasChange("cluster_type") && d.Get("cluster_type") == "SECONDARY" { - return fmt.Errorf("Can not convert a primary cluster to a secondary cluster.") - } - // Restrict setting secondary_config if cluster_type is PRIMARY if d.Get("cluster_type") == "PRIMARY" && !tpgresource.IsEmptyValue(reflect.ValueOf(d.Get("secondary_config"))) { return fmt.Errorf("Can not set secondary config for primary cluster.")