From f97343dea15335af23a2dc5bfa291e2b81ccf77d Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Fri, 20 Mar 2015 10:11:12 -0500 Subject: [PATCH] provider/aws: Fix issue in AWS AutoScaling Group where health_check_type is not set correctly --- builtin/providers/aws/resource_aws_autoscaling_group.go | 2 +- builtin/providers/aws/resource_aws_autoscaling_group_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_autoscaling_group.go b/builtin/providers/aws/resource_aws_autoscaling_group.go index efabb1638..2950e252d 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group.go @@ -137,7 +137,7 @@ func resourceAwsAutoscalingGroupCreate(d *schema.ResourceData, meta interface{}) autoScalingGroupOpts.DefaultCooldown = aws.Integer(v.(int)) } - if v, ok := d.GetOk("health_check"); ok && v.(string) != "" { + if v, ok := d.GetOk("health_check_type"); ok && v.(string) != "" { autoScalingGroupOpts.HealthCheckType = aws.String(v.(string)) } diff --git a/builtin/providers/aws/resource_aws_autoscaling_group_test.go b/builtin/providers/aws/resource_aws_autoscaling_group_test.go index d940bb40d..2a7e053be 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group_test.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group_test.go @@ -130,7 +130,7 @@ func testAccCheckAWSAutoScalingGroupAttributes(group *autoscaling.AutoScalingGro } if *group.HealthCheckType != "ELB" { - return fmt.Errorf("Bad health_check_type: %s", *group.HealthCheckType) + return fmt.Errorf("Bad health_check_type,\nexpected: %s\ngot: %s", "ELB", *group.HealthCheckType) } if *group.HealthCheckGracePeriod != 300 {