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
This commit is contained in:
parent
a76105b0f1
commit
4a791c1b41
|
@ -59,7 +59,6 @@ func resourceAwsAutoscalingGroup() *schema.Resource {
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
ForceNew: true,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"force_delete": &schema.Schema{
|
"force_delete": &schema.Schema{
|
||||||
|
@ -219,6 +218,10 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{})
|
||||||
AutoScalingGroupName: aws.String(d.Id()),
|
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") {
|
if d.HasChange("desired_capacity") {
|
||||||
opts.DesiredCapacity = aws.Long(int64(d.Get("desired_capacity").(int)))
|
opts.DesiredCapacity = aws.Long(int64(d.Get("desired_capacity").(int)))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue