From d79b479ad2fc18e9abc59f0e5cd3ba3cbeca50a3 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 6 Apr 2017 16:28:50 -0600 Subject: [PATCH] final nit fix --- builtin/providers/opc/resource_ip_address_association.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/providers/opc/resource_ip_address_association.go b/builtin/providers/opc/resource_ip_address_association.go index 32ebf43d9e..de7dec4dbf 100644 --- a/builtin/providers/opc/resource_ip_address_association.go +++ b/builtin/providers/opc/resource_ip_address_association.go @@ -79,9 +79,10 @@ func resourceOPCIPAddressAssociationCreate(d *schema.ResourceData, meta interfac func resourceOPCIPAddressAssociationRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*compute.Client).IPAddressAssociations() + name := d.Id() getInput := compute.GetIPAddressAssociationInput{ - Name: d.Id(), + name, } result, err := client.GetIPAddressAssociation(&getInput) if err != nil { @@ -90,11 +91,11 @@ func resourceOPCIPAddressAssociationRead(d *schema.ResourceData, meta interface{ d.SetId("") return nil } - return fmt.Errorf("Error reading IP Address Association %s: %s", getInput.Name, err) + return fmt.Errorf("Error reading IP Address Association %s: %s", name, err) } if result == nil { d.SetId("") - return fmt.Errorf("Error reading IP Address Association %s: %s", getInput.Name, err) + return fmt.Errorf("Error reading IP Address Association %s: %s", name, err) } d.Set("name", result.Name)