Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force-send min_ready_sec #5402

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down