tf_destroy
Preview and then destroy all Terraform-managed infrastructure with two-step safety. Shows a destroy plan first; requires explicit approval to execute.
Instructions
Destroy all Terraform-managed infrastructure in the workspace.
TWO-STEP SAFETY FLOW:
Call without confirmed=true → shows the destroy plan (what will be deleted).
Call with confirmed=true after the user explicitly approves → destroys everything.
This is irreversible. Always show the plan and get explicit user approval first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workdir": "<workdir>"
},
"name": "tf_destroy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vars | No | Variable overrides in key=value format, e.g. ["region=us-east-1"] | |
| target | No | Limit operation to a specific resource address, e.g. aws_instance.web | |
| varFile | No | Path to a .tfvars or .tfvars.json file | |
| workdir | Yes | Absolute or relative path to the directory containing .tf files | |
| confirmed | No | Must be true to actually destroy. Omit or false to preview only. | |
| workspace | No | Terraform workspace to use (default: current workspace) |