From 47ba9b30c729f50e74dd71fe13c1d34972f38eab Mon Sep 17 00:00:00 2001 From: Nathan McKinley Date: Wed, 23 Jan 2019 21:34:50 +0000 Subject: [PATCH] add ForceNew to firewall direction field. Signed-off-by: Modular Magician --- google/resource_compute_firewall.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/google/resource_compute_firewall.go b/google/resource_compute_firewall.go index 835bf55e0aa..2ca203fe0e5 100644 --- a/google/resource_compute_firewall.go +++ b/google/resource_compute_firewall.go @@ -112,6 +112,7 @@ func resourceComputeFirewall() *schema.Resource { Type: schema.TypeString, Computed: true, Optional: true, + ForceNew: true, ValidateFunc: validation.StringInSlice([]string{"INGRESS", "EGRESS", ""}, false), }, "disabled": { @@ -457,12 +458,6 @@ func resourceComputeFirewallUpdate(d *schema.ResourceData, meta interface{}) err } else if v, ok := d.GetOkExists("destination_ranges"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, destinationRangesProp)) { obj["destinationRanges"] = destinationRangesProp } - directionProp, err := expandComputeFirewallDirection(d.Get("direction"), d, config) - if err != nil { - return err - } else if v, ok := d.GetOkExists("direction"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, directionProp)) { - obj["direction"] = directionProp - } disabledProp, err := expandComputeFirewallDisabled(d.Get("disabled"), d, config) if err != nil { return err