final nit fix

This commit is contained in:
= 2017-04-06 16:28:50 -06:00
parent 1d02ed51c1
commit d79b479ad2
1 changed files with 4 additions and 3 deletions

View File

@ -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)