HashiCorp Certified: Terraform Associate — Question 237

What does terraform destroy do?

Answer options

Correct answer: C

Explanation

The correct answer is C because the terraform destroy command is specifically designed to remove all infrastructure that is currently managed by the Terraform state file. Options A and B incorrectly describe the impact on the state file and code files, while option D is misleading as it suggests that all infrastructure from the provider is destroyed without specifying the state file context.