# HCP Terraform (Terraform Cloud) integration

> Infrastructure-as-code platform API for workspaces, runs, plans and applies, state versions, variables, teams, notifications, policies, and the private module registry.

- Authentication: apiKey

## Tools (98)

- **Add Remote State Consumers**: Allow workspaces to read this workspace's state
- **Add Team Members**: Add users to a team
- **Add Variable to Variable Set**: Add a variable to a variable set
- **Add Workspace Tags**: Add flat tags to a workspace
- **Apply Run**: Confirm and apply a planned run
- **Apply Variable Set to Workspaces**: Attach a variable set to workspaces
- **Assign SSH Key to Workspace**: Assign or unassign a workspace's SSH key
- **Attach Policy Set to Workspaces**: Enforce a policy set on workspaces
- **Cancel Run**: Gracefully cancel a planning or applying run
- **Create Agent Pool**: Create a self-hosted agent pool
- **Create Configuration Version**: Create a configuration version and upload Terraform files
- **Create Notification Configuration**: Add a webhook/Slack/email notification to a workspace
- **Create Organization**: Create a new organization
- **Create Policy Set**: Create a Sentinel/OPA policy set
- **Create Project**: Create a project in an organization
- **Create Run**: Queue a plan/apply run on a workspace
- **Create State Version**: Push a new state version to a locked workspace
- **Create Team**: Create a team with organization-access permissions
- **Create Variable Set**: Create a reusable variable set in an organization
- **Create Workspace**: Create a workspace in an organization
- **Create Workspace Variable**: Create a Terraform or environment variable on a workspace
- **Delete Notification Configuration**: Delete a notification configuration
- **Delete Organization**: Permanently delete an organization
- **Delete Project**: Delete an empty project
- **Delete Registry Module**: Remove a module provider from the private registry
- **Delete Team**: Delete a team
- **Delete Variable from Variable Set**: Remove a variable from a variable set
- **Delete Variable Set**: Delete a variable set
- **Delete Workspace Variable**: Delete a workspace variable
- **Discard Run**: Discard a run awaiting confirmation
- **Force Cancel Run**: Immediately terminate a run
- **Force Delete Workspace**: Delete a workspace even if it still manages resources
- **Force Execute Run**: Jump a pending run past the workspace queue
- **Force Unlock Workspace**: Force-unlock a workspace regardless of lock holder
- **Get Current Workspace Outputs**: Get the latest output values for a workspace
- **Get Plan JSON Output**: Download the machine-readable JSON execution plan
- **List Agent Pools**: List self-hosted agent pools in an organization
- **List Agents in Pool**: List the agents registered in a pool with status
- **List Configuration Versions**: List a workspace's configuration versions
- **List Notification Configurations**: List a workspace's notification configurations
- **List Organization Runs**: List runs across all workspaces in an organization
- **List Organizations**: List organizations the token can access
- **List Policy Sets**: List Sentinel/OPA policy sets in an organization
- **List Projects**: List projects in an organization
- **List Project Tag Bindings**: List key-value tags bound to a project
- **List Registry Modules**: List private registry modules in an organization
- **List Remote State Consumers**: List workspaces allowed to read this workspace's state
- **List State Version Outputs**: List the outputs recorded in a state version
- **List State Versions**: List state versions for a workspace
- **List Teams**: List teams in an organization
- **List Variable Sets**: List variable sets in an organization
- **List Variables in Variable Set**: List the variables inside a variable set
- **List Workspace Runs**: List runs in a workspace with status filtering
- **List Workspaces**: List workspaces in an organization
- **List Workspace Tags**: List flat tags on a workspace
- **List Workspace Variables**: List a workspace's Terraform and environment variables
- **Lock Workspace**: Lock a workspace to block new runs
- **Move Workspaces Into Project**: Move workspaces into a project
- **Publish Registry Module from VCS**: Publish a private module from a VCS repository
- **Recover Apply Errored State**: Download state from a failed state upload
- **Remove Remote State Consumers**: Revoke workspaces' access to this workspace's state
- **Remove Team Members**: Remove users from a team
- **Remove Variable Set from Workspaces**: Detach a variable set from workspaces
- **Remove Workspace Tags**: Remove flat tags from a workspace
- **Rollback State Version**: Roll a workspace's state back to a previous version
- **Safe Delete Workspace**: Delete a workspace only if it manages no resources
- **Show Account Details**: Get the user the API token belongs to (whoami)
- **Show Agent Pool**: Get one agent pool's details
- **Show Apply**: Get an apply's status, changes, and log URL
- **Show Configuration Commit Information**: Get the VCS commit behind a configuration version
- **Show Configuration Version**: Get a configuration version's status and metadata
- **Show Current State Version**: Get a workspace's current state version with download URL
- **Show Notification Configuration**: Get one notification configuration
- **Show Organization**: Get one organization's settings and permissions
- **Show Organization Entitlement Set**: Get the organization's pricing-tier feature entitlements
- **Show Plan**: Get a plan's status, changes summary, and log URL
- **Show Policy Set**: Get one policy set's details
- **Show Project**: Get one project's details
- **Show Registry Module**: Get one private registry module's details and versions
- **Show Run**: Get one run's status, plan/apply links, and actions
- **Show State Version**: Get one state version's details
- **Show State Version Output**: Get one output value from a state version
- **Show Team**: Get one team's details and permissions
- **Show Variable Set**: Get one variable set with its variables and scope
- **Show Workspace**: Get one workspace's details and current-run summary
- **Unlock Workspace**: Unlock a workspace locked by this token's user
- **Update Agent Pool**: Update an agent pool's name or scope
- **Update Notification Configuration**: Update a notification configuration
- **Update Organization**: Update organization settings
- **Update Policy Set**: Update a policy set's settings
- **Update Project**: Update a project's name, description, or settings
- **Update Project Tag Bindings**: Add or update key-value tags on a project
- **Update Team**: Update a team's permissions or visibility
- **Update Variable in Variable Set**: Update a variable inside a variable set
- **Update Variable Set**: Update a variable set's attributes and scope
- **Update Workspace**: Update workspace settings
- **Update Workspace Variable**: Update a workspace variable
- **Verify Notification Configuration**: Send a test notification to the destination

## Triggers (1)

- **New Run in HCP Terraform**: Triggers when a new run is queued on an HCP Terraform workspace. The status filter is evaluated against each run's state at poll time — a run that transitions into the chosen state after its creation slips out of the lookback window and is missed.

## Related prompts

- [Daily Terraform health digest, posted straight to Slack](https://www.generalinput.com/prompts/daily-terraform-health-digest-posted-straight-to-slack.md)
- [Instantly triage failed Terraform runs in Slack and Jira](https://www.generalinput.com/prompts/instantly-triage-failed-terraform-runs-in-slack-and-jira.md)
- [Track every Terraform run in Slack and a spreadsheet](https://www.generalinput.com/prompts/track-every-terraform-run-in-slack-and-a-spreadsheet.md)
- [Catch destructive Terraform applies before approval](https://www.generalinput.com/prompts/catch-destructive-terraform-applies-before-approval.md)

Connect HCP Terraform (Terraform Cloud) in General Input: https://www.generalinput.com/apps/terraform-cloud