From 86c7aeb8a6edd88b259a52777077a51a98153a79 Mon Sep 17 00:00:00 2001 From: Jack Pearkes Date: Tue, 29 Jul 2014 10:18:48 -0400 Subject: [PATCH] providers/aws: use merged reosource state for associate_public_ip cc/ @vertis --- builtin/providers/aws/resource_aws_instance.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_instance.go b/builtin/providers/aws/resource_aws_instance.go index 4e86d551b..ef1a16870 100644 --- a/builtin/providers/aws/resource_aws_instance.go +++ b/builtin/providers/aws/resource_aws_instance.go @@ -35,8 +35,8 @@ func resource_aws_instance_create( } associatePublicIPAddress := false - if attr, ok := d.Attributes["associate_public_ip_address"]; ok { - associatePublicIPAddress = attr.New != "" && attr.New != "false" + if rs.Attributes["associate_public_ip_address"] == "true" { + associatePublicIPAddress = true } // Build the creation struct