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:
commit
7b9e58423c
|
@ -498,6 +498,7 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error {
|
||||||
if *ni.Attachment.DeviceIndex == 0 {
|
if *ni.Attachment.DeviceIndex == 0 {
|
||||||
d.Set("subnet_id", ni.SubnetId)
|
d.Set("subnet_id", ni.SubnetId)
|
||||||
d.Set("network_interface_id", ni.NetworkInterfaceId)
|
d.Set("network_interface_id", ni.NetworkInterfaceId)
|
||||||
|
d.Set("associate_public_ip_address", ni.Association != nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue