discover_terraform_resources
Discover all Terraform resources in a module directory to identify resources available for import. Returns addresses and count/for_each usage for each resource.
Instructions
Discover all Terraform resources in a module directory. Use this first to see what resources are available for import. Returns list of resources with their addresses and whether they use count/for_each.
Args: module_path (str): Path to the module directory containing Terraform files
Returns: str: JSON with resources list, showing resource_address, has_count, has_for_each for each resource
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": {
"module_path": "<module_path>"
},
"name": "discover_terraform_resources"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |