What does `terraform destroy` do?
BeginnerConceptWorkflow and CLI
Answer
It removes every resource tracked in the current state; it is equivalent to terraform apply -destroy. Run terraform plan -destroy first to preview. Resources with prevent_destroy = true make it fail, and some (non-empty S3 buckets) fail unless force_destroy is set.
More on Workflow and CLI
What does `terraform init` do?BeginnerWhat does `terraform plan` do?BeginnerWhat does `terraform apply` do and what is `-auto-approve`?BeginnerWhat do `terraform fmt` and `terraform validate` check?BeginnerWhy save a plan with `-out` and apply that file?IntermediateWhat does `-detailed-exitcode` do?Intermediate