Search⌘ K

Destroy Terraform-managed Infrastructure

Explore how to use the terraform destroy command to remove infrastructure managed by Terraform. Understand the command's purpose, key options, and best practices for safely tearing down resources in development, testing, or project cleanup scenarios.

Purpose of the terraform destroy command

Destroying what we deployed seems counterintuitive, but there are many cases where it might be useful. We might be deploying development environments for a project and want to clean up the resources when the project concludes. We might be building an environment for testing in a CI/CD pipeline and want to tear down the environment when the tests ...