运行 terraform 并等待需要很长时间。
所以我想运行它来排除执行时间最长的rds
或者我只想运行 ec2 资源。
有没有办法在地形中做这样的事情?
您可以使用-target=resource https://www.terraform.io/docs/commands/apply.html#target-resource像这样:
terraform plan -target=module.mymodule.aws_instance.myinstance
terraform apply -target=module.mymodule.aws_instance.myinstance
or
terraform plan -target=aws_instance.myinstance
terraform apply -target=aws_instance.myinstance
免责声明:在否决答案之前,请注意,他们实际上要求“排除”或“仅运行 ec2 资源”。毕竟这段时间排除功能请求 https://github.com/hashicorp/terraform/issues/2253仍然在 terraform 存储库中打开。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)