From e79ebfc11331e0173967eca497532c0de3a02ce0 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Wed, 19 Oct 2016 16:16:04 +0100 Subject: [PATCH] Infer aws_instance.associate_public_ip_address from the presence of a network interface association. --- builtin/providers/aws/resource_aws_instance.go | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/providers/aws/resource_aws_instance.go b/builtin/providers/aws/resource_aws_instance.go index c50cb8022..a5dfa4b6f 100644 --- a/builtin/providers/aws/resource_aws_instance.go +++ b/builtin/providers/aws/resource_aws_instance.go @@ -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 {