tf_state_addresses
List resource instance addresses in the current Terraform state, optionally filtered by address or id, to inspect managed resources without changing or locking state.
Instructions
List resource instance addresses in the current Terraform state (terraform state list), optionally filtered. Does not change state: never locks, never refreshes. Credential environment variables are withheld unless the operator sets TERRAFORM_CWD_MCP_ALLOW_BACKEND_CREDENTIALS=1, which passes a remote backend its own variables. Instance keys that look secret or equal a sensitive value are hidden. Executes code when any address has a string key: finding sensitive keys runs terraform show, which starts the provider plugins. A non-default workspace that does not exist is refused (reading it would create it).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "tf_state_addresses"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Only the instance whose id attribute equals this (terraform state list -id) | |
| dir | No | Terraform root module directory (must already be initialized), inside the server's directory or TERRAFORM_CWD_MCP_ALLOWED_DIRS. Default: TERRAFORM_CWD_MCP_DIR, else the server's working directory. | |
| limit | No | Max addresses to return (default 200) | |
| filter | No | Case-sensitive substring of the address as printed, e.g. 'module.network' or 'aws_instance.' |