Terraform state list
tf_state_listList Terraform or OpenTofu state resources to get resource addresses and a byType rollup for large states. Use it to inspect tracked infrastructure before planning changes or debugging drift.
Instructions
List resources in Terraform state. Returns the resource addresses, plus a byType rollup once there are more than 20 (type, name, and module are readable from each address).
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": {
"cwd": "<cwd>"
},
"name": "tf_state_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Terraform project directory | |
| binary | No | terraform or tofu (default $TF_BINARY, else terraform) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| byType | No | ||
| retained | No | ||
| resources | Yes |