HashiCorp Certified: Terraform Associate — Question 344
Which of the following is not a way to trigger terraform destroy?
Answer options
- A. Using the destroy command with auto-approve
- B. Running terraform destroy from the correct directory and then typing "yes" when prompted in the CLI
- C. Passing --destroy at the end of a plan request
- D. Delete the state file and run terraform apply
Correct answer: D
Explanation
The correct answer is D because deleting the state file and running terraform apply does not trigger a destroy operation; instead, it may result in a new resource creation. Options A, B, and C are all valid methods to initiate a terraform destroy command.