From 43cb233707809e47712e6a0bc29ab7c2ba33781f Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Tue, 22 May 2018 07:12:11 +0400 Subject: [PATCH] PR #4511 updated one line fix --- aws/resource_aws_spot_fleet_request.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/aws/resource_aws_spot_fleet_request.go b/aws/resource_aws_spot_fleet_request.go index 51947c51383..21c06cef0d8 100644 --- a/aws/resource_aws_spot_fleet_request.go +++ b/aws/resource_aws_spot_fleet_request.go @@ -383,11 +383,9 @@ func buildSpotFleetLaunchSpecification(d map[string]interface{}, meta interface{ } } - if d["iam_instance_profile_arn"] != "" { - if v, ok := d["iam_instance_profile_arn"]; ok { - opts.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{ - Arn: aws.String(v.(string)), - } + if v, ok := d["iam_instance_profile_arn"]; ok && v.(string) != "" { + opts.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{ + Arn: aws.String(v.(string)), } }