HashiCorp
TERRAFORM-ASSOCIATE-004 · Question #256
What does terraform destroy do?
The correct answer is A. Destroys all infrastructure in the Terraform state file.. terraform destroy removes all resources currently tracked in the Terraform state file by issuing destroy requests to the configured providers. It does not delete configuration files or providers
Submitted by mateo_ar· Apr 18, 2026Use Terraform CLI
Question
What does terraform destroy do?
Options
- ADestroys all infrastructure in the Terraform state file.
- BDestroys all Terraform code files in the current directory, leaving the state file intact.
- CDestroys all infrastructure in the configured Terraform provider.
- DDestroys the Terraform state file, leaving the infrastructure intact.
How the community answered
(59 responses)- A88% (52)
- B2% (1)
- C7% (4)
- D3% (2)
Explanation
terraform destroy removes all resources currently tracked in the Terraform state file by issuing destroy requests to the configured providers. It does not delete configuration files or providers
Topics
#terraform destroy#Terraform CLI#infrastructure deletion#Terraform state
Community Discussion
No community discussion yet for this question.