final nit fix
This commit is contained in:
parent
1d02ed51c1
commit
d79b479ad2
|
@ -79,9 +79,10 @@ func resourceOPCIPAddressAssociationCreate(d *schema.ResourceData, meta interfac
|
||||||
|
|
||||||
func resourceOPCIPAddressAssociationRead(d *schema.ResourceData, meta interface{}) error {
|
func resourceOPCIPAddressAssociationRead(d *schema.ResourceData, meta interface{}) error {
|
||||||
client := meta.(*compute.Client).IPAddressAssociations()
|
client := meta.(*compute.Client).IPAddressAssociations()
|
||||||
|
name := d.Id()
|
||||||
|
|
||||||
getInput := compute.GetIPAddressAssociationInput{
|
getInput := compute.GetIPAddressAssociationInput{
|
||||||
Name: d.Id(),
|
name,
|
||||||
}
|
}
|
||||||
result, err := client.GetIPAddressAssociation(&getInput)
|
result, err := client.GetIPAddressAssociation(&getInput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -90,11 +91,11 @@ func resourceOPCIPAddressAssociationRead(d *schema.ResourceData, meta interface{
|
||||||
d.SetId("")
|
d.SetId("")
|
||||||
return nil
|
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 {
|
if result == nil {
|
||||||
d.SetId("")
|
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)
|
d.Set("name", result.Name)
|
||||||
|
|
Loading…
Reference in New Issue