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)

This commit is contained in:
The Magician 2018-06-11 14:17:04 -07:00 committed by Dana Hoffman
parent c51ab5f28e
commit 605c950b18

View File

@ -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,