From 76117fa9f61f1975e56f890db585db9e7dd27fef Mon Sep 17 00:00:00 2001 From: Jay Wang Date: Thu, 30 Mar 2017 18:44:39 -0700 Subject: [PATCH] Even better error message. --- .../azurerm/resource_arm_local_network_gateway.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/builtin/providers/azurerm/resource_arm_local_network_gateway.go b/builtin/providers/azurerm/resource_arm_local_network_gateway.go index 8d23a2ae7..64c2243fb 100644 --- a/builtin/providers/azurerm/resource_arm_local_network_gateway.go +++ b/builtin/providers/azurerm/resource_arm_local_network_gateway.go @@ -102,12 +102,7 @@ func resourceArmLocalNetworkGatewayRead(d *schema.ResourceData, meta interface{} } name := id.Path["localNetworkGateways"] if name == "" { - var pathString, sp string - for key, value := range id.Path { - pathString += fmt.Sprintf("%s'%s:%s'", sp, key, value) - sp = ", " - } - return fmt.Errorf("Cannot find 'localNetworkGateways' in [%s], make sure it is specified in the ID parameter", pathString) + return fmt.Errorf("Cannot find 'localNetworkGateways' in '%s', make sure it is specified in the ID parameter", d.Id()) } resGroup := id.ResourceGroup