tf_init
Initialize a Terraform working directory by downloading required providers and modules. Run this before planning or applying infrastructure changes.
Instructions
Initialize a Terraform working directory. Downloads providers and modules. Run this before plan or apply on a fresh workspace.
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_init"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| upgrade | No | Pass -upgrade to update providers/modules to latest allowed versions | |
| workdir | Yes | Absolute or relative path to the directory containing .tf files | |
| reconfigure | No | Pass -reconfigure to reinitialize backend even if already configured |