Skip to content

Commit

Permalink
fix for issue in PR hashicorp#4511
Browse files Browse the repository at this point in the history
  • Loading branch information
saravanan30erd committed May 18, 2018
1 parent 738838e commit ea61a30
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions aws/resource_aws_spot_fleet_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,11 @@ func buildSpotFleetLaunchSpecification(d map[string]interface{}, meta interface{
}
}

if v, ok := d["iam_instance_profile_arn"]; ok {
opts.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{
Arn: aws.String(v.(string)),
if d["iam_instance_profile_arn"] != "" {
if v, ok := d["iam_instance_profile_arn"]; ok {
opts.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{
Arn: aws.String(v.(string)),
}
}
}

Expand Down

0 comments on commit ea61a30

Please sign in to comment.