UpdateOpts not optional
This commit is contained in:
parent
3427597bd0
commit
fa15d41d45
|
@ -171,25 +171,15 @@ func resourceLBMonitorV1Update(d *schema.ResourceData, meta interface{}) error {
|
||||||
return fmt.Errorf("Error creating OpenStack networking client: %s", err)
|
return fmt.Errorf("Error creating OpenStack networking client: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
var updateOpts monitors.UpdateOpts
|
updateOpts := monitors.UpdateOpts{
|
||||||
if d.HasChange("delay") {
|
Delay: d.Get("delay").(int),
|
||||||
updateOpts.Delay = d.Get("delay").(int)
|
Timeout: d.Get("timeout").(int),
|
||||||
}
|
MaxRetries: d.Get("max_retries").(int),
|
||||||
if d.HasChange("timeout") {
|
URLPath: d.Get("url_path").(string),
|
||||||
updateOpts.Timeout = d.Get("timeout").(int)
|
HTTPMethod: d.Get("http_method").(string),
|
||||||
}
|
ExpectedCodes: d.Get("expected_codes").(string),
|
||||||
if d.HasChange("max_retries") {
|
|
||||||
updateOpts.MaxRetries = d.Get("max_retries").(int)
|
|
||||||
}
|
|
||||||
if d.HasChange("url_path") {
|
|
||||||
updateOpts.URLPath = d.Get("url_path").(string)
|
|
||||||
}
|
|
||||||
if d.HasChange("http_method") {
|
|
||||||
updateOpts.HTTPMethod = d.Get("http_method").(string)
|
|
||||||
}
|
|
||||||
if d.HasChange("expected_codes") {
|
|
||||||
updateOpts.ExpectedCodes = d.Get("expected_codes").(string)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if d.HasChange("admin_state_up") {
|
if d.HasChange("admin_state_up") {
|
||||||
asuRaw := d.Get("admin_state_up").(string)
|
asuRaw := d.Get("admin_state_up").(string)
|
||||||
if asuRaw != "" {
|
if asuRaw != "" {
|
||||||
|
|
Loading…
Reference in New Issue