tf_resource
Manage Terraform resource state: import existing cloud resources, taint, untaint, or refresh state to sync with real infrastructure.
Instructions
Resource-level state operations:
import: Bring an existing cloud resource under Terraform management (requires address + id)
taint: Mark a resource for recreation on next apply (requires address)
untaint: Remove the taint mark (requires address)
refresh: Sync state with real infrastructure (accepts drift into state)
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>",
"operation": "<operation>"
},
"name": "tf_resource"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Cloud provider resource ID for import, e.g. i-0abcd1234 or an Azure resource ID | |
| address | No | Resource address, e.g. aws_instance.web (required for import/taint/untaint) | |
| workdir | Yes | Absolute or relative path to the directory containing .tf files | |
| operation | Yes | Resource operation to perform | |
| workspace | No | Terraform workspace to use (default: current workspace) |