Adding empty string defaults for network interface and instance when reading `aws_eip` resource.
This commit is contained in:
Harry Macey 2015-12-16 17:29:40 -05:00 committed by justnom
parent d4e4fb6ea0
commit 4f5df717b4
1 changed files with 4 additions and 0 deletions

View File

@ -146,9 +146,13 @@ func resourceAwsEipRead(d *schema.ResourceData, meta interface{}) error {
d.Set("association_id", address.AssociationId)
if address.InstanceId != nil {
d.Set("instance", address.InstanceId)
} else {
d.Set("instance", "")
}
if address.NetworkInterfaceId != nil {
d.Set("network_interface", address.NetworkInterfaceId)
} else {
d.Set("network_interface", "")
}
d.Set("private_ip", address.PrivateIpAddress)
d.Set("public_ip", address.PublicIp)