From 995b3e60c21087df019f66a3f0173784550b2583 Mon Sep 17 00:00:00 2001 From: Vincent Roseberry Date: Thu, 4 Jan 2018 10:51:13 -0500 Subject: [PATCH] Don't access attributes on a nil object --- google/resource_compute_network_peering.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/resource_compute_network_peering.go b/google/resource_compute_network_peering.go index 85b4a59d810..bbb2dc7bc2f 100644 --- a/google/resource_compute_network_peering.go +++ b/google/resource_compute_network_peering.go @@ -96,7 +96,7 @@ func resourceComputeNetworkPeeringRead(d *schema.ResourceData, meta interface{}) network, err := config.clientCompute.Networks.Get(networkFieldValue.Project, networkFieldValue.Name).Do() if err != nil { - return handleNotFoundError(err, d, fmt.Sprintf("Network %q", network.Name)) + return handleNotFoundError(err, d, fmt.Sprintf("Network %q", networkFieldValue.Name)) } peering := findPeeringFromNetwork(network, peeringName)