Skip to main content
Glama

terraform-cloud-mcp

state_version_outputs.md3.06 kB
# State Version Outputs Tools The state version outputs tools module provides functions for working with state version outputs in Terraform Cloud. ## Overview State version outputs represent the output values from Terraform state files, including their names, values, types, and sensitivity information. These tools allow you to retrieve and inspect the outputs generated by your Terraform configurations. ## API Reference These tools interact with the Terraform Cloud State Version Outputs API: - [State Version Outputs API Documentation](https://developer.hashicorp.com/terraform/cloud-docs/api-docs/state-version-outputs) - [State Versions Concepts](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/state) ## Tools Reference ### list_state_version_outputs **Function:** `list_state_version_outputs(state_version_id: str, page_number: int = 1, page_size: int = 20) -> Dict[str, Any]` **Description:** Retrieves a paginated list of all outputs for a specific state version. **Parameters:** - `state_version_id` (str): The ID of the state version (format: "sv-xxxxxxxx") - `page_number` (int): Page number to fetch (default: 1) - `page_size` (int): Number of results per page (default: 20, max: 100) **Returns:** JSON response containing paginated state version outputs with name, value, type, and sensitivity information. **Notes:** - Outputs are populated asynchronously after state version upload - Check the `resources-processed` property on the state version to confirm processing is complete - Requires "read" permission for the associated workspace - Sensitive outputs will show `sensitive: true` but hide the actual value ### get_state_version_output **Function:** `get_state_version_output(state_version_output_id: str) -> Dict[str, Any]` **Description:** Retrieves detailed information about a specific state version output by ID. **Parameters:** - `state_version_output_id` (str): The ID of the state version output (format: "wsout-xxxxxxxx") **Returns:** JSON response containing comprehensive output details including name, value, type, and detailed type information. **Notes:** - Provides both simplified and detailed type information - Sensitive outputs will not expose their values in the response - Requires "read" permission for the associated workspace - Output IDs are typically obtained from listing outputs first **Common Error Scenarios:** | Error | Cause | Solution | |-------|-------|----------| | 404 | Output not found | Verify the ID exists and you have proper permissions | | 422 | Invalid output ID format | Ensure the ID matches pattern "wsout-xxxxxxxx" | | 403 | Insufficient permissions | Verify your API token has proper workspace access | | 202 | Processing incomplete | Wait for state version processing to complete | ## Related Resources - [State Version Outputs Models](../models/state_version_outputs.md) - [State Version Tools](./state_versions.md) - [Terraform Cloud API - State Version Outputs](https://developer.hashicorp.com/terraform/cloud-docs/api-docs/state-version-outputs)

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/severity1/terraform-cloud-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server