Skip to content

Commit 1843de1

Browse files
199201shubhamsahuCheriit
authored andcommitted
Remove cluster update validation for primary to secondary (GoogleCloudPlatform#10588)
1 parent 274bf58 commit 1843de1

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

mmv1/templates/terraform/pre_update/alloydb_cluster.go.erb

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// Restrict modification of cluster_type from PRIMARY to SECONDARY as it is an invalid operation
2-
if d.HasChange("cluster_type") && d.Get("cluster_type") == "SECONDARY" {
3-
return fmt.Errorf("Can not convert a primary cluster to a secondary cluster.")
4-
}
5-
61
// Restrict setting secondary_config if cluster_type is PRIMARY
72
if d.Get("cluster_type") == "PRIMARY" && !tpgresource.IsEmptyValue(reflect.ValueOf(d.Get("secondary_config"))) {
83
return fmt.Errorf("Can not set secondary config for primary cluster.")

0 commit comments

Comments
 (0)