Reputation: 5660
terraform destroy -var-file='filename'
**Do you really want to destroy?**
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
However, I want to change the command such that it will destroy without asking the question Do you really want to destroy? So what argument should I provide it ?
Upvotes: 9
Views: 40228
Reputation: 1237
terraform destroy -auto-approve
From the docs:
This [destroy] command accepts all the arguments and flags that the apply command accepts, with the exception of a plan file argument.
If
-auto-approve
is set, then the destroy confirmation will not be shown.
Upvotes: 30