TA-002-P · Question #400
What does terraform destroy do?
The correct answer is A. Destroy all infrastructure in the Terraform state file. The terraform destroy command terminates resources managed by your Terraform project. This command is the inverse of terraform apply in that it terminates all the resources specified in your Terraform state. It does not destroy resources running elsewhere that are not managed by
Question
What does terraform destroy do?
Options
- ADestroy all infrastructure in the Terraform state file
- BDestroy all Terraform code files in the current directory while leaving the state file intact
- CDestroy all infrastructure in the configured Terraform provider
- DDestroy the Terraform state file while leaving infrastructure intact
How the community answered
(21 responses)- A90% (19)
- C5% (1)
- D5% (1)
Explanation
The terraform destroy command terminates resources managed by your Terraform project. This command is the inverse of terraform apply in that it terminates all the resources specified in your Terraform state. It does not destroy resources running elsewhere that are not managed by the current Terraform project. https://learn.hashicorp.com/tutorials/terraform/aws-destroy
Topics
Community Discussion
No community discussion yet for this question.