Terraform Destroy
Cleaning up your Terraform deployment
Last updated
Cleaning up your Terraform deployment
Last updated
The terraform destroy
command is a convenient way to destroy all remote objects managed by a particular Terraform configuration.
While you will typically not want to destroy long-lived objects in a production environment, Terraform is sometimes used to manage ephemeral infrastructure for development purposes, in which case you can use terraform destroy
to conveniently clean up all of those temporary objects once you are finished with your work.
Looks at the recorded, stored state file created during deployment and destroys all resources created by your code.
Should be used with caution, as it is a non-reversible command. Take backups, and be sure that you want to delete infrastructure