Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

terraform autoscaling group destroy timeouts

Is there any way to change the terraform default timeouts?

For example on terraform apply I frequently timeout trying to destroy autoscaling groups:

module.foo.aws_autoscaling_group.bar (deposed #0): Still destroying... (10m0s elapsed)
Error applying plan:

1 error(s) occurred:

 * aws_autoscaling_group.bar (deposed #0): group still has 1 instances

If I re-run the terraform apply, it works. It seems like the timeout is 10 minutes -- I'd like to double the time so that it finishes reliably. Alternatively, is there a way to get the auto scaling groups to delete faster?

like image 492
JDiMatteo Avatar asked Nov 16 '25 02:11

JDiMatteo


1 Answers

You can add a timeout to a specific resource inside terraform

 timeouts {
    create = "60m"
    delete = "2h"
  }

https://www.terraform.io/docs/configuration/resources.html

like image 78
strongjz Avatar answered Nov 17 '25 18:11

strongjz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!