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.
Each badge shows the default agent permission of an endpoint (allowed: an agent calls it without asking; ask first: you are asked before an agent calls it, when the agent or chat asks permission for sensitive actions; never: no agent may call it), which every user can change endpoint by endpoint in their credential settings.
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 runPOSTAgents: ask firstApplies a planned Terraform run to execute infrastructure changes.cancel_runCancel runPOSTAgents: ask firstGracefully cancels a running Terraform plan or apply operation.create_runCreate runPOSTAgents: ask firstCreates a new Terraform plan/apply run in a workspace.discard_runDiscard runPOSTAgents: ask firstDiscards a planned Terraform run without applying changes.force_cancel_runForce cancel runPOSTAgents: ask firstImmediately force-cancels a Terraform run without graceful shutdown.get_runGet runGETAgents: ask firstRetrieves details of a specific Terraform Cloud run.list_runsList runsGETAgents: ask firstLists all runs in a Terraform Cloud workspace with pagination.
Workspace, 7 operations
create_workspaceCreate workspacePOSTAgents: ask firstCreates a new workspace in a Terraform Cloud organization.delete_workspaceDelete workspaceDELETEAgents: ask firstPermanently deletes a Terraform Cloud workspace and all its content.get_workspaceGet workspaceGETAgents: ask firstRetrieves details of a specific Terraform Cloud workspace.list_workspacesList workspacesGETAgents: ask firstLists all workspaces in a Terraform Cloud organization with search and pagination.lock_workspaceLock workspacePOSTAgents: ask firstLocks a Terraform Cloud workspace to prevent new runs.unlock_workspaceUnlock workspacePOSTAgents: ask firstUnlocks a Terraform Cloud workspace to allow new runs.update_workspaceUpdate workspacePATCHAgents: ask firstUpdates the configuration of a Terraform Cloud workspace.
State version, 4 operations
create_state_versionCreate state versionPOSTAgents: ask firstCreate a new state version for a workspace (used to upload Terraform state)get_current_state_versionGet current state versionGETAgents: ask firstRetrieves the current state version for a Terraform Cloud workspace.get_state_versionGet state versionGETAgents: ask firstGet a specific Terraform state version by IDlist_state_versionsList state versionsGETAgents: ask firstLists all state versions for a Terraform Cloud workspace.
Variable, 4 operations
create_variableCreate variablePOSTAgents: ask firstCreates a new variable in a Terraform Cloud workspace.delete_variableDelete variableDELETEAgents: ask firstDeletes a variable from a Terraform Cloud workspace.list_workspace_variablesList workspace variablesGETAgents: ask firstLists all variables configured in a Terraform Cloud workspace.update_variableUpdate variablePATCHAgents: ask firstUpdates an existing variable in a Terraform Cloud workspace.
Configuration version, 3 operations
create_configuration_versionCreate configuration versionPOSTAgents: ask firstCreate a new configuration version for uploading Terraform configurationget_configuration_versionGet configuration versionGETAgents: ask firstGet a specific configuration version by IDlist_configuration_versionsList configuration versionsGETAgents: ask firstList configuration versions for a workspace
Organization, 2 operations
get_organizationGet organizationGETAgents: ask firstRetrieves details of a specific Terraform Cloud organization.list_organizationsList organizationsGETAgents: ask firstLists all Terraform Cloud organizations accessible to the authenticated user.
Plan, 2 operations
get_planGet planGETAgents: ask firstRetrieves details of a specific Terraform plan.get_plan_json_outputGet plan json outputGETAgents: ask firstRetrieves the structured JSON output of a completed Terraform plan.
Project, 1 operation
list_projectsList projectsGETAgents: ask firstList all projects in a Terraform Cloud organization
Team, 1 operation
list_teamsList teamsGETAgents: ask firstLists all teams in a Terraform Cloud organization.
Team member, 1 operation
list_team_membersList team membersGETAgents: ask firstList 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.
