Terraform Cloud integration
Terraform Cloud (HCP Terraform) API for managing infrastructure as code workspaces, runs, state, variables, and organizations. Trigger plan and apply operations, manage workspace configurations, and control team access for collaborative infrastructure management.
Say what should happen.
The workflow builds itself.
Common Terraform Cloud use cases
- automate configuration version management
- automate state version management
- Kill stuck runs
- Audit team access
- Check plan results
- Rotate credentials
- Maintenance windows
- Monitor run progress
- Stop long-running plans
- Clean up unused variables
What you can do with Terraform Cloud
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Run, 7 operations
apply_runApply runPOSTApplies a planned Terraform run to execute infrastructure changes.cancel_runCancel runPOSTGracefully cancels a running Terraform plan or apply operation.create_runCreate runPOSTCreates a new Terraform plan/apply run in a workspace.discard_runDiscard runPOSTDiscards a planned Terraform run without applying changes.force_cancel_runForce cancel runPOSTImmediately force-cancels a Terraform run without graceful shutdown.get_runGet runGETRetrieves details of a specific Terraform Cloud run.list_runsList runsGETLists all runs in a Terraform Cloud workspace with pagination.
Workspace, 7 operations
create_workspaceCreate workspacePOSTCreates a new workspace in a Terraform Cloud organization.delete_workspaceDelete workspaceDELETEPermanently deletes a Terraform Cloud workspace and all its content.get_workspaceGet workspaceGETRetrieves details of a specific Terraform Cloud workspace.list_workspacesList workspacesGETLists all workspaces in a Terraform Cloud organization with search and pagination.lock_workspaceLock workspacePOSTLocks a Terraform Cloud workspace to prevent new runs.unlock_workspaceUnlock workspacePOSTUnlocks a Terraform Cloud workspace to allow new runs.update_workspaceUpdate workspacePATCHUpdates the configuration of a Terraform Cloud workspace.
State version, 4 operations
create_state_versionCreate state versionPOSTCreate a new state version for a workspace (used to upload Terraform state)get_current_state_versionGet current state versionGETRetrieves the current state version for a Terraform Cloud workspace.get_state_versionGet state versionGETGet a specific Terraform state version by IDlist_state_versionsList state versionsGETLists all state versions for a Terraform Cloud workspace.
Variable, 4 operations
create_variableCreate variablePOSTCreates a new variable in a Terraform Cloud workspace.delete_variableDelete variableDELETEDeletes a variable from a Terraform Cloud workspace.list_workspace_variablesList workspace variablesGETLists all variables configured in a Terraform Cloud workspace.update_variableUpdate variablePATCHUpdates an existing variable in a Terraform Cloud workspace.
Configuration version, 3 operations
create_configuration_versionCreate configuration versionPOSTCreate a new configuration version for uploading Terraform configurationget_configuration_versionGet configuration versionGETGet a specific configuration version by IDlist_configuration_versionsList configuration versionsGETList configuration versions for a workspace
Organization, 2 operations
get_organizationGet organizationGETRetrieves details of a specific Terraform Cloud organization.list_organizationsList organizationsGETLists all Terraform Cloud organizations accessible to the authenticated user.
Plan, 2 operations
get_planGet planGETRetrieves details of a specific Terraform plan.get_plan_json_outputGet plan json outputGETRetrieves the structured JSON output of a completed Terraform plan.
Project, 1 operation
list_projectsList projectsGETList all projects in a Terraform Cloud organization
Team, 1 operation
list_teamsList teamsGETLists all teams in a Terraform Cloud organization.
Team member, 1 operation
list_team_membersList team membersGETList all users that are members of a team
Terraform Cloud API rate limits
- 30 requests per second
Terraform Cloud uses JSON:API format. All requests should include Content-Type: application/vnd.api+json header.
These are the limits Terraform Cloud documents, not ones LiveContext measured. They can change and often depend on your plan, so check the Terraform Cloud documentation for current values.
Use Terraform Cloud from Claude Code, Cursor or Codex
Connect Terraform Cloud in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Terraform Cloud operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect Terraform Cloud
- Create your workspace
Sign up free. Nothing to install.
- Connect Terraform Cloud once
Add your Terraform Cloud connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
Terraform Cloud integration FAQ
What can you do with the Terraform Cloud integration?
LiveContext exposes 32 operations on Terraform Cloud, covering run, workspace, state version and variable. Common uses include automate configuration version management, automate state version management and Kill stuck runs.
What are the Terraform Cloud API rate limits?
Terraform Cloud documents 30 requests per second. Terraform Cloud uses JSON:API format. All requests should include Content-Type: application/vnd.api+json header. Limits are set by Terraform Cloud and can depend on your plan.
