Generate Terraform for a resource
generate_terraformCreate a Terraform HCL resource block for one OCI resource from its type and OCID. Fetches the resource's attributes and maps them to the matching oci_* resource.
Instructions
Generate a Terraform (HCL) resource block for a single OCI resource by type and OCID. Fetches the resource's attributes and maps them to the matching oci_* 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": {
"resourceType": "<resourceType>",
"ocid": "<ocid>"
},
"name": "generate_terraform"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ocid | Yes | The resource OCID | |
| resourceType | Yes | OCI resource type, e.g. Vcn, Subnet, Instance | |
| compartmentId | No | Compartment OCID (for scoping) |