From 14d133f57431a18083868a0207ad1b5b9bd6fabb Mon Sep 17 00:00:00 2001 From: Lars Wander Date: Sat, 13 Feb 2016 09:47:35 -0500 Subject: [PATCH] provider/google: Fix VPN Region bug --- builtin/providers/google/resource_compute_vpn_gateway.go | 4 ++-- builtin/providers/google/resource_compute_vpn_tunnel.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/providers/google/resource_compute_vpn_gateway.go b/builtin/providers/google/resource_compute_vpn_gateway.go index 697ec8b64..562e3dfac 100644 --- a/builtin/providers/google/resource_compute_vpn_gateway.go +++ b/builtin/providers/google/resource_compute_vpn_gateway.go @@ -83,7 +83,7 @@ func resourceComputeVpnGatewayRead(d *schema.ResourceData, meta interface{}) err config := meta.(*Config) name := d.Get("name").(string) - region := d.Get("region").(string) + region := getOptionalRegion(d, config) project := config.Project vpnGatewaysService := compute.NewTargetVpnGatewaysService(config.clientCompute) @@ -111,7 +111,7 @@ func resourceComputeVpnGatewayDelete(d *schema.ResourceData, meta interface{}) e config := meta.(*Config) name := d.Get("name").(string) - region := d.Get("region").(string) + region := getOptionalRegion(d, config) project := config.Project vpnGatewaysService := compute.NewTargetVpnGatewaysService(config.clientCompute) diff --git a/builtin/providers/google/resource_compute_vpn_tunnel.go b/builtin/providers/google/resource_compute_vpn_tunnel.go index f6290504b..b9ce28529 100644 --- a/builtin/providers/google/resource_compute_vpn_tunnel.go +++ b/builtin/providers/google/resource_compute_vpn_tunnel.go @@ -113,7 +113,7 @@ func resourceComputeVpnTunnelRead(d *schema.ResourceData, meta interface{}) erro config := meta.(*Config) name := d.Get("name").(string) - region := d.Get("region").(string) + region := getOptionalRegion(d, config) project := config.Project vpnTunnelsService := compute.NewVpnTunnelsService(config.clientCompute) @@ -143,7 +143,7 @@ func resourceComputeVpnTunnelDelete(d *schema.ResourceData, meta interface{}) er config := meta.(*Config) name := d.Get("name").(string) - region := d.Get("region").(string) + region := getOptionalRegion(d, config) project := config.Project vpnTunnelsService := compute.NewVpnTunnelsService(config.clientCompute)