get_terraform_imports
Generates Terraform import blocks for LogicMonitor resource types, enabling you to bring existing portal objects under Terraform management and generate their configuration.
Instructions
List a resource type's portal objects as Terraform import blocks for the logicmonitor/logicmonitor provider, one import { to, id } block per object, for 15 of the provider resource types that import by ID; cluster alert confs are left out, since the API refuses the read the provider's importer makes. Run terraform init, then terraform plan -generate-config-out=generated.tf on the blocks to have Terraform write the resource configuration. The provider authenticates with LMv1 api_id and api_key only.
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": {
"resource_type": "<resource_type>"
},
"name": "get_terraform_imports"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results | |
| filter | No | LogicMonitor filter expression, sent as written | |
| offset | No | Pagination offset | |
| resource_type | Yes | Provider resource type, without the logicmonitor_ prefix |