From 4a791c1b410827ff131ab4d11169f552790e23e3 Mon Sep 17 00:00:00 2001 From: Nathan Sullivan Date: Fri, 26 Jun 2015 15:51:31 +1000 Subject: [PATCH] default_cooldown change shouldnt force new resource - https://github.com/hashicorp/terraform/issues/2509 - credit to @phinze and @mzupan for https://github.com/hashicorp/terraform/pull/2147 --- builtin/providers/aws/resource_aws_autoscaling_group.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_autoscaling_group.go b/builtin/providers/aws/resource_aws_autoscaling_group.go index abded26af..d80f26644 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group.go @@ -59,7 +59,6 @@ func resourceAwsAutoscalingGroup() *schema.Resource { Type: schema.TypeInt, Optional: true, Computed: true, - ForceNew: true, }, "force_delete": &schema.Schema{ @@ -219,6 +218,10 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) AutoScalingGroupName: aws.String(d.Id()), } + if d.HasChange("default_cooldown") { + opts.DefaultCooldown = aws.Long(int64(d.Get("default_cooldown").(int))) + } + if d.HasChange("desired_capacity") { opts.DesiredCapacity = aws.Long(int64(d.Get("desired_capacity").(int))) }