Merge pull request #9453 from tomwilkie/8187-import-associate_public_ip_address

Infer aws_instance.associate_public_ip_address from the presence of a network interface association.
This commit is contained in:
Clint 2016-10-19 10:24:34 -05:00 committed by GitHub
commit 7b9e58423c
1 changed files with 1 additions and 0 deletions

View File

@ -498,6 +498,7 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error {
if *ni.Attachment.DeviceIndex == 0 {
d.Set("subnet_id", ni.SubnetId)
d.Set("network_interface_id", ni.NetworkInterfaceId)
d.Set("associate_public_ip_address", ni.Association != nil)
}
}
} else {