From 605c950b18ad81178f2d20ea8a8fcbc8b3cdf2f2 Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 11 Jun 2018 14:17:04 -0700 Subject: [PATCH] Add DiffSuppress for global address ip_version. IPV4 and empty are equivalent, but the API will return whichever one was sent on creation. Fixes #1637. (#1639) --- google/resource_compute_global_address.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/google/resource_compute_global_address.go b/google/resource_compute_global_address.go index 1257714f..a509d627 100644 --- a/google/resource_compute_global_address.go +++ b/google/resource_compute_global_address.go @@ -51,10 +51,11 @@ func resourceComputeGlobalAddress() *schema.Resource { ForceNew: true, }, "ip_version": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{"IPV4", "IPV6", ""}, false), + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"IPV4", "IPV6", ""}, false), + DiffSuppressFunc: emptyOrDefaultStringSuppress("IPV4"), }, "address": { Type: schema.TypeString,