Skip to main content
Glama

Export an existing resource to Terraform

export_terraform
Read-onlyIdempotent

Generate Terraform (HCL) for EXISTING Control Plane resources from a self link. Single resource (/org/acme/gvc/prod/workload/api) or bulk by path depth — /org/acme exports the whole org, /org/acme/gvc/prod/workload exports every workload in a GVC. Set generateImports to get ready-to-run terraform import commands for adopting the resources into Terraform state, and includeDependencies to pull in referenced resources. Secrets are never exported — a ref that targets secrets is refused, and an export that would pull secrets in is refused wholesale. An unsupported kind is rejected with the supported list (list_terraform_kinds, full profile, enumerates them up front). For an in-memory manifest, use convert_to_terraform. Recommended reading: get_cpln_skill("iac-terraform-pulumi").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resourceYesSelf link of an existing resource, e.g. `/org/acme/gvc/prod/workload/api` (a full `https://api.cpln.io/org/...` URL is also accepted). Use a shorter path for a bulk export: `/org/acme` (whole org) or `/org/acme/gvc/prod/workload` (all workloads in a GVC).
generateImportsNoAlso return the matching `terraform import` commands, one per resource with the import IDs prefilled. Run them after `terraform init` and before the first `terraform apply` so the existing resources are adopted into state instead of re-created.
includeDependenciesNoAlso export referenced/dependent resources so the generated HCL is self-contained.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the call succeeded.
dataNoThe full machine-readable result — list rows, the resource object, query results. Read THIS, not just the summary.
summaryYesOne-line summary of the result.
nextStepsNoRecommended follow-up actions for this task, in order.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds significant behavioral context beyond the annotations, revealing that secrets are never exported and that unsupported resource kinds are rejected with a list. It also explains the behavior of generateImports and includeDependencies, giving the agent a clear picture of edge cases and side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately long but every sentence adds value: examples, bulk export behavior, flags, secret handling, error handling, alternative tool, and further reading. It is front-loaded with the core purpose and stays organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with an output schema, the description covers purpose, usage alternatives, edge cases (secrets, unsupported kinds), and parameter guidance. It does not need to describe return values since the output schema covers that, making the description complete for the agent's selection and invocation needs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% description coverage for all three parameters, including examples and operational details. The tool description repeats much of this information without adding new semantic insights, so it meets the baseline but does not elevate it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Generate Terraform (HCL) for EXISTING Control Plane resources from a self link.' It uses specific verbs and resources, and distinguishes itself from the sibling tool convert_to_terraform by noting the difference between existing resources and in-memory manifests.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool, including bulk export scenarios based on path depth. It names an alternative (convert_to_terraform) and excludes secret-exporting cases, effectively covering when-not-to-use. It also directs users to a skill for further reading.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.1/5.0
Disambiguation5/5

Every tool targets a distinct resource/action pair (e.g., get_resource vs get_resource_schema, list_deployments vs list_workload_replicas) and descriptions clearly differentiate purposes. No two tools appear to do the same thing.

Naming Consistency5/5

All tools follow a verb_noun snake_case pattern (create_gvc, update_workload, list_resources, query_metrics) with consistent verbs. The few imperative verbs (browse, build, mount) still maintain the same verb-first structure.

Tool Count1/5

With 55 tools, this server far exceeds the typical well-scoped 3-15 tool range. While each tool appears purposeful, the sheer number creates selection overhead and falls into the extreme 50+ category on the rubric.

Completeness4/5

The surface covers nearly the full Control Plane lifecycle: CRUD for GVC, workload, identity, policy, volumeset, and domain, plus observability, templates, image builds, and Terraform. Minor gaps include referenced but missing configure_workload_* tools and no secret creation/deletion (by design).