diff --git a/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go.erb b/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go.erb index 761d2dcab928..69198c44d6ef 100644 --- a/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go.erb +++ b/mmv1/third_party/terraform/resources/resource_compute_instance_group_manager.go.erb @@ -928,6 +928,10 @@ func expandUpdatePolicy(configured []interface{}) *compute.InstanceGroupManagerU updatePolicy.MinimalAction = data["minimal_action"].(string) updatePolicy.Type = data["type"].(string) updatePolicy.ReplacementMethod = data["replacement_method"].(string) +<% unless version == "ga" -%> + updatePolicy.MinReadySec = int64(data["min_ready_sec"].(int)) + updatePolicy.ForceSendFields = []string{"MinReadySec"} +<% end -%> // percent and fixed values are conflicting // when the percent values are set, the fixed values will be ignored @@ -958,12 +962,6 @@ func expandUpdatePolicy(configured []interface{}) *compute.InstanceGroupManagerU NullFields: []string{"Percent"}, } } - -<% unless version == "ga" -%> - if v, ok := data["min_ready_sec"]; ok { - updatePolicy.MinReadySec = int64(v.(int)) - } -<% end -%> } return updatePolicy } diff --git a/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go.erb b/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go.erb index 1faa85cc8eb9..57b53f5701b8 100644 --- a/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go.erb +++ b/mmv1/third_party/terraform/resources/resource_compute_region_instance_group_manager.go.erb @@ -785,6 +785,10 @@ func expandRegionUpdatePolicy(configured []interface{}) *compute.InstanceGroupMa updatePolicy.Type = data["type"].(string) updatePolicy.InstanceRedistributionType = data["instance_redistribution_type"].(string) updatePolicy.ReplacementMethod = data["replacement_method"].(string) +<% unless version == "ga" -%> + updatePolicy.MinReadySec = int64(data["min_ready_sec"].(int)) + updatePolicy.ForceSendFields = []string{"MinReadySec"} +<% end -%> // percent and fixed values are conflicting // when the percent values are set, the fixed values will be ignored @@ -815,12 +819,6 @@ func expandRegionUpdatePolicy(configured []interface{}) *compute.InstanceGroupMa NullFields: []string{"Percent"}, } } - -<% unless version == "ga" -%> - if v, ok := data["min_ready_sec"]; ok { - updatePolicy.MinReadySec = int64(v.(int)) - } -<% end -%> } return updatePolicy }