get_variable_set
Retrieve details for a specific Terraform Cloud variable set including variables, workspace assignments, and configuration to manage infrastructure settings.
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 for the 'get_variable_set' tool. It takes a varset_id parameter and makes a GET request to the Terraform Cloud API endpoint `/varsets/{varset_id}` to retrieve the variable set details.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)Registration of the 'get_variable_set' tool using the mcp.tool() decorator in the main server file.mcp.tool()(variables.get_variable_set)