From 4f5df717b4fcd7b0a1f7b748b2b1571e8e244c2e Mon Sep 17 00:00:00 2001 From: Harry Macey Date: Wed, 16 Dec 2015 17:29:40 -0500 Subject: [PATCH] Fixes #4351 Adding empty string defaults for network interface and instance when reading `aws_eip` resource. --- builtin/providers/aws/resource_aws_eip.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builtin/providers/aws/resource_aws_eip.go b/builtin/providers/aws/resource_aws_eip.go index 4b369ee60..8bc71c9a3 100644 --- a/builtin/providers/aws/resource_aws_eip.go +++ b/builtin/providers/aws/resource_aws_eip.go @@ -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)