From dcaf0f8b87c330dde0533d63238437a558603fc5 Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Sun, 6 Sep 2015 12:01:57 -0500 Subject: [PATCH] provider/aws: correct && -> || mistake Thanks for the sanity check, @aparrentlymart and @dwradcliffe :) --- builtin/providers/aws/resource_aws_instance.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_instance.go b/builtin/providers/aws/resource_aws_instance.go index b79923d82..934cabb25 100644 --- a/builtin/providers/aws/resource_aws_instance.go +++ b/builtin/providers/aws/resource_aws_instance.go @@ -1074,7 +1074,7 @@ func awsTerminateInstance(conn *ec2.EC2, id string) error { } func iamInstanceProfileArnToName(ip *ec2.IamInstanceProfile) string { - if ip == nil && ip.Arn == nil { + if ip == nil || ip.Arn == nil { return "" } return strings.Split(*ip.Arn, "/")[1]