Skip to main content
Glama

get_state_version_output

Retrieve detailed information about a Terraform state version output, including its name, value, type, and sensitivity, using the state version output ID. Access via the Terraform Cloud MCP server for efficient infrastructure management.

Instructions

Get details for a specific state version output.

Retrieves comprehensive information about a state version output including its name, value, type, and sensitivity information.

API endpoint: GET /state-version-outputs/:state_version_output_id

Args: state_version_output_id: The ID of the state version output (format: "wsout-xxxxxxxx")

Returns: State version output details including name, value, type, and sensitivity information

See: docs/tools/state_version_outputs.md for reference documentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
state_version_output_idYes

Implementation Reference

  • The main asynchronous handler function that validates input using StateVersionOutputRequest and fetches state version output details via the Terraform Cloud API.
    @handle_api_errors async def get_state_version_output(state_version_output_id: str) -> APIResponse: """Get details for a specific state version output. Retrieves comprehensive information about a state version output including its name, value, type, and sensitivity information. API endpoint: GET /state-version-outputs/:state_version_output_id Args: state_version_output_id: The ID of the state version output (format: "wsout-xxxxxxxx") Returns: State version output details including name, value, type, and sensitivity information See: docs/tools/state_version_outputs.md for reference documentation """ # Validate parameters params = StateVersionOutputRequest(state_version_output_id=state_version_output_id) # Make API request return await api_request(f"state-version-outputs/{params.state_version_output_id}")
  • Pydantic model used for input validation in the get_state_version_output tool, defining and validating the state_version_output_id parameter.
    class StateVersionOutputRequest(APIRequest): """Request model for retrieving a specific state version output. Used to validate the state version output ID parameter for API requests. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/state-version-outputs#show-a-state-version-output See: docs/models/state_version_outputs.md for reference """ state_version_output_id: str = Field( ..., description="The ID of the state version output to retrieve", pattern=r"^wsout-[a-zA-Z0-9]{16}$", # Standard state version output ID pattern )
  • Registration of the get_state_version_output tool in the FastMCP server instance.
    mcp.tool()(state_version_outputs.get_state_version_output)

Other Tools

Related Tools

Latest Blog Posts

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