Skip to content

Commit 29c15a3

Browse files
Remove cluster update validation for primary to secondary (#10588) (#7326)
[upstream:29ad7f672bb64f621878f757096e759bfedae0b7] Signed-off-by: Modular Magician <[email protected]>
1 parent cea8cd8 commit 29c15a3

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

google-beta/services/alloydb/resource_alloydb_cluster.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,11 +1166,6 @@ func resourceAlloydbClusterUpdate(d *schema.ResourceData, meta interface{}) erro
11661166
if err != nil {
11671167
return err
11681168
}
1169-
// Restrict modification of cluster_type from PRIMARY to SECONDARY as it is an invalid operation
1170-
if d.HasChange("cluster_type") && d.Get("cluster_type") == "SECONDARY" {
1171-
return fmt.Errorf("Can not convert a primary cluster to a secondary cluster.")
1172-
}
1173-
11741169
// Restrict setting secondary_config if cluster_type is PRIMARY
11751170
if d.Get("cluster_type") == "PRIMARY" && !tpgresource.IsEmptyValue(reflect.ValueOf(d.Get("secondary_config"))) {
11761171
return fmt.Errorf("Can not set secondary config for primary cluster.")

0 commit comments

Comments
 (0)