Skip to content

Commit

Permalink
Remove cluster update validation for primary to secondary (GoogleClou…
Browse files Browse the repository at this point in the history
  • Loading branch information
199201shubhamsahu authored and pcostell committed Jul 16, 2024
1 parent c4739fa commit 80e6aac
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions mmv1/templates/terraform/pre_update/alloydb_cluster.go.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// 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.")
Expand Down

0 comments on commit 80e6aac

Please sign in to comment.