Even better error message.

This commit is contained in:
Jay Wang 2017-03-30 18:44:39 -07:00
parent 1db5efc8bc
commit ebd5dc5d3d
1 changed files with 1 additions and 6 deletions

View File

@ -102,12 +102,7 @@ func resourceArmLocalNetworkGatewayRead(d *schema.ResourceData, meta interface{}
} }
name := id.Path["localNetworkGateways"] name := id.Path["localNetworkGateways"]
if name == "" { if name == "" {
var pathString, sp string return fmt.Errorf("Cannot find 'localNetworkGateways' in '%s', make sure it is specified in the ID parameter", d.Id())
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)
} }
resGroup := id.ResourceGroup resGroup := id.ResourceGroup