terraform autoscaling group destroy timeouts

試著忘記壹切 提交于 2019-12-23 22:36:37

问题


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?


回答1:


You can add a timeout to a specific resource inside terraform

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

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




回答2:


i have the same problem when i try to delete autoscaling-group with terraform destroy I solve the problem with add the follow lines on my resource creation section:

    timeouts {  
    delete = "60m"
  }


来源:https://stackoverflow.com/questions/44092511/terraform-autoscaling-group-destroy-timeouts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!