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)