Skip to content

Commit

Permalink
default_cooldown change shouldnt force new resource - #2509 - credit to
Browse files Browse the repository at this point in the history
  • Loading branch information
CpuID committed Jun 26, 2015
1 parent a76105b commit 4a791c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion builtin/providers/aws/resource_aws_autoscaling_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func resourceAwsAutoscalingGroup() *schema.Resource {
Type: schema.TypeInt,
Optional: true,
Computed: true,
ForceNew: true,
},

"force_delete": &schema.Schema{
Expand Down Expand Up @@ -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)))
}
Expand Down

0 comments on commit 4a791c1

Please sign in to comment.