我如何能够执行以下命令:
terraform apply
#=>
. . .
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value:
没有随后的交互式提示?
terraform apply -auto-approve
https://www.terraform.io/docs/commands/apply.html#auto-approve
下面是对已保存的方案使用自动批准的示例。
警告:这是一个销毁计划,不要只是复制它。
$ terraform plan -destroy -out=tfplan -input=false -lock=false
(details omitted)
Plan: 0 to add, 0 to change, 2 to destroy.
───────────────────────────────────────────────────────
Saved the plan to: tfplan
要完全执行这些操作,请运行以下命令进行应用:terraform apply "tfplan"
$ terraform apply -input=false -auto-approve -lock=false tfplan
(details omitted)
Apply complete! Resources: 0 added, 0 changed, 2 destroyed.