Terraform show
tf_showFetch current Terraform or OpenTofu state as structured JSON with resource types and attributes, enabling AI workflows to inspect infrastructure without parsing raw CLI output.
Instructions
Show current Terraform state as structured JSON. Returns resource summary with types and attributes.
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_show"
}
}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 |
|---|---|---|---|
| count | Yes | ||
| retained | No | ||
| resources | Yes |