terraform自动缩放组销毁超时 [英] terraform autoscaling group destroy timeouts

查看:136
本文介绍了terraform自动缩放组销毁超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以改变terraform的默认超时时间?

Is there any way to change the terraform default timeouts?

例如在terraform apply上,我经常尝试破坏自动伸缩组超时:

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

如果我重新运行Terraform应用程序,它将起作用.超时似乎是10分钟-我想将时间加倍,以便可靠地完成.另外,有没有办法让自动缩放组更快地删除?

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?

推荐答案

您可以向terraform中的特定资源添加超时

You can add a timeout to a specific resource inside terraform

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

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

这篇关于terraform自动缩放组销毁超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆