Forrest logo
back to the terraform tool

terraform-plan:tldr:5b4dd

terraform-plan: Show a plan to destroy all remote objects that currently exist.
$ terraform plan -destroy
try on your machine

The command "terraform plan -destroy" is used in the Terraform infrastructure provisioning tool.

The "terraform plan" command is usually used to preview changes that will be applied to your infrastructure based on your Terraform configuration files. It generates an execution plan that displays what resources will be created, modified, or deleted when you run "terraform apply".

However, when you add the "-destroy" flag, it instructs Terraform to create an execution plan specifically for destroying the infrastructure that was created with your Terraform configuration. This means that the plan will show which resources will be destroyed and removed from your cloud provider or infrastructure environment.

Running "terraform plan -destroy" is a safe way to preview the destruction of resources in your infrastructure without actually executing it. It is useful when you want to understand the impact of destroying resources before proceeding with the actual destruction.

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