get_variable_set
Retrieve comprehensive details about a Terraform Cloud variable set, including variables, workspace assignments, and configuration, using the varset ID.
Instructions
Get details for a specific variable set.
Retrieves comprehensive information about a variable set including its variables, workspace assignments, and configuration.
API endpoint: GET /varsets/{varset_id}
Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx")
Returns: Variable set details including configuration and relationships
See: docs/tools/variables.md#get-variable-set for reference documentation
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| varset_id | Yes |
Implementation Reference
- The handler function that retrieves details for a specific variable set by making a GET request to the Terraform Cloud API endpoint /varsets/{varset_id}.@handle_api_errors async def get_variable_set(varset_id: str) -> APIResponse: """Get details for a specific variable set. Retrieves comprehensive information about a variable set including its variables, workspace assignments, and configuration. API endpoint: GET /varsets/{varset_id} Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx") Returns: Variable set details including configuration and relationships See: docs/tools/variables.md#get-variable-set for reference documentation """ endpoint = f"varsets/{varset_id}" return await api_request(endpoint, method="GET")
- terraform_cloud_mcp/server.py:132-132 (registration)Registers the get_variable_set function as an MCP tool in the server.mcp.tool()(variables.get_variable_set)