Skip to content

Commit

Permalink
Fix flattened custom patchable resources (#3741)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and chrisst committed May 30, 2019
1 parent 3035f1b commit afff5fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions google/resource_compute_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,12 @@ func resourceComputeNetworkUpdate(d *schema.ResourceData, meta interface{}) erro

if d.HasChange("routing_mode") {
obj := make(map[string]interface{})
routingModeProp := d.Get("routing_mode")
obj["routingMode"] = routingModeProp
routingConfigProp, err := expandComputeNetworkRoutingConfig(nil, d, config)
if err != nil {
return err
} else if v, ok := d.GetOkExists("routing_config"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, routingConfigProp)) {
obj["routingConfig"] = routingConfigProp
}

url, err := replaceVars(d, config, "https://www.googleapis.com/compute/v1/projects/{{project}}/global/networks/{{name}}")
if err != nil {
Expand Down

0 comments on commit afff5fa

Please sign in to comment.