From 9fe6317348949851e3630e1e6ffab6228396f8d7 Mon Sep 17 00:00:00 2001 From: Mike Zupan Date: Sat, 25 Apr 2015 19:50:33 -0700 Subject: [PATCH 1/2] don't need to create a new ASG for this change Tested ``` aws_autoscaling_group.rabbit: Modifying... health_check_grace_period: "200" => "3000" aws_autoscaling_group.rabbit: Modifications complete ``` --- 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 da8548e3fba9..3d1af449153a 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group.go @@ -67,7 +67,6 @@ func resourceAwsAutoscalingGroup() *schema.Resource { Type: schema.TypeInt, Optional: true, Computed: true, - ForceNew: true, }, "health_check_type": &schema.Schema{ From 0177be2a667abea9227112b0cd3ed47afea36fd2 Mon Sep 17 00:00:00 2001 From: Mike Zupan Date: Sat, 25 Apr 2015 20:00:04 -0700 Subject: [PATCH 2/2] need to update aws with the change if there is one --- builtin/providers/aws/resource_aws_autoscaling_group.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builtin/providers/aws/resource_aws_autoscaling_group.go b/builtin/providers/aws/resource_aws_autoscaling_group.go index 3d1af449153a..741e3b72530f 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group.go @@ -234,6 +234,10 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) if d.HasChange("max_size") { opts.MaxSize = aws.Long(int64(d.Get("max_size").(int))) } + + if d.HasChange("health_check_grace_period") { + opts.HealthCheckGracePeriod = aws.Long(int64(d.Get("health_check_grace_period").(int))) + } if err := setAutoscalingTags(autoscalingconn, d); err != nil { return err