Forrest logo
back to the terraform tool

terraform:tldr:0750d

terraform: Destroy Terraform-managed infrastructure.
$ terraform destroy
try on your machine

The terraform destroy command is used with the Terraform infrastructure-as-code tool to tear down or destroy the infrastructure previously created using Terraform.

When you run terraform destroy, Terraform analyzes the configured state to understand the current state of the infrastructure. It then compares the desired state with the actual state of the infrastructure resources and identifies the resources that are no longer needed or have been changed.

After identifying the resources to destroy, Terraform will initiate the destruction process by contacting the underlying infrastructure provider API and orchestrating the removal of the resources.

By running terraform destroy, you are triggering the destruction process and removing all the resources that were created using the Terraform configuration. It is important to note that this action is irreversible, and the state of the infrastructure will be reset to a state where no Terraform-managed resources exist.

Before executing terraform destroy, it is recommended to review the list of resources that will be deleted and ensure the implications are understood.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the terraform tool