From c122323d1407d0bca2ea13bc698452e0253f6357 Mon Sep 17 00:00:00 2001 From: Mike Zupan Date: Fri, 29 May 2015 13:40:15 -0700 Subject: [PATCH 1/2] Switching the healthcheck shouldn't cause a refresh of the resource Switching the healthcheck from elb->ec2 or ec2->elb shouldn't cause the ASG to re-create itself --- builtin/providers/aws/resource_aws_autoscaling_group.go | 1 - 1 file changed, 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_autoscaling_group.go b/builtin/providers/aws/resource_aws_autoscaling_group.go index 50de22153e..04aed35513 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group.go @@ -79,7 +79,6 @@ func resourceAwsAutoscalingGroup() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ForceNew: true, }, "availability_zones": &schema.Schema{ From e7fa85517484422254b5ee0c8c062245c13608fe Mon Sep 17 00:00:00 2001 From: Mike Zupan Date: Sat, 30 May 2015 02:51:56 -0700 Subject: [PATCH 2/2] making the update happen --- builtin/providers/aws/resource_aws_autoscaling_group.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builtin/providers/aws/resource_aws_autoscaling_group.go b/builtin/providers/aws/resource_aws_autoscaling_group.go index 04aed35513..60f3cba855 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group.go @@ -240,6 +240,11 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) opts.HealthCheckGracePeriod = aws.Long(int64(d.Get("health_check_grace_period").(int))) } + if d.HasChange("health_check_type") { + opts.HealthCheckGracePeriod = aws.Long(int64(d.Get("health_check_grace_period").(int))) + opts.HealthCheckType = aws.String(d.Get("health_check_type").(string)) + } + if err := setAutoscalingTags(conn, d); err != nil { return err } else {