有什么方法可以更改terraform默认超时吗?
例如在terraform apply
上,我经常超时尝试破坏自动缩放组:
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分钟-我想将时间翻倍,以便可靠地完成。另外,有没有办法让自动缩放组更快地删除?
最佳答案
您可以向terraform中的特定资源添加超时
timeouts {
create = "60m"
delete = "2h"
}
https://www.terraform.io/docs/configuration/resources.html