> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Terraform

> How to set up the Terraform connector, plus the actions and events that are available.

![Terraform](https://stackone-logos.com/api/terraform/filled/svg)

v3.1.1[See changelog](https://docs.stackone.com/connectors/terraform/changelog.md)

[130 actions](#actions) · [10 events](#events) · 1 auth method

Infrastructure
IAM

## Getting Started

**1. Create or Select a Project**

Set up a new project or select an existing one. See [Organizations & Projects](https://docs.stackone.com/gateway/concepts/organizations-and-projects.md).

**2. Configure the Connector**

Enable the connector and create a Connector Profile in your project. See [Setup Connector Profile](https://docs.stackone.com/gateway/quickstart.md#setup-connector-profile).

> [card] [API Token · Connector Profile](https://docs.stackone.com/connectors/terraform/guides/connector-profile/api-token.md)
>
> Uses a Terraform Cloud or Terraform Enterprise user API token, so actions run with that user's permissions.

Optionally, configure receiving Events for Terraform into StackOne.

> [card] [Webhooks setup](https://docs.stackone.com/connectors/terraform/guides/webhook-setup.md)

**3. Link an Account**

Link an account [from the dashboard](https://docs.stackone.com/connect/managing-connectors/linking-accounts.md#link-from-the-dashboard) (or via [StackOne Hub](https://docs.stackone.com/embed/account-linking/overview)).

See the guide for the authentication type chosen in the Connector Profile:

> [card] [API Token · Link Account](https://docs.stackone.com/connectors/terraform/guides/link-account/api-token.md)

**4. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).

## Actions

130 actions

ActionDescription

Get Account Details`terraform_get_account`

Retrieve details about the authenticated user's account.

List Agent Pools`terraform_list_agent_pools`

List all agent pools for an organization.

List Configuration Versions`terraform_list_configuration_versions`

List configuration versions for a workspace.

Get Configuration Version`terraform_get_configuration_version`

Retrieve details about a specific configuration version.

Get Configuration Version Commit Info`terraform_get_configuration_version_commit_info`

Retrieve commit information for a configuration version.

Create Configuration Version`terraform_create_configuration_version`

Create a new configuration version for uploading configuration files.

Archive Configuration Version`terraform_archive_configuration_version`

Archive a configuration version.

Soft Delete Configuration Version`terraform_soft_delete_configuration_version`

Mark a configuration version for garbage collection (Enterprise only).

Restore Configuration Version`terraform_restore_configuration_version`

Restore a configuration version marked for garbage collection (Enterprise only).

Permanently Delete Configuration Version`terraform_permanently_delete_configuration_version`

Permanently delete a configuration version (Enterprise only).

Get Cost Estimate`terraform_get_cost_estimate`

Retrieve a cost estimate for a run.

Get Unified Credentials`terraform_unified_get_me`

Get the authenticated HCP Terraform identity for the current connection.

List Unified Groups`terraform_unified_list_groups`

List unified groups (teams) in a HCP Terraform organization. filter.organization\_id is optional — auto-resolved when the...

Get Unified Group`terraform_unified_get_group`

Get a single unified HCP Terraform group (team) by ID.

List Unified Organizations`terraform_unified_list_organizations`

List unified HCP Terraform organizations visible to the connected token.

Get Unified Organization`terraform_unified_get_organization`

Get a single unified HCP Terraform organization by name.

List Unified Resource Types`terraform_unified_list_resource_types`

List the resource types this connector supports for permission checks.

List Unified Resource Users`terraform_unified_list_resource_users`

List the users with access to a specific HCP Terraform team or workspace.

List Unified Roles`terraform_unified_list_roles`

List the stable HCP Terraform organization-level IAM roles.

Get Unified Role`terraform_unified_get_role`

Get a single unified HCP Terraform IAM role by its stable key.

List Unified Users`terraform_unified_list_users`

List unified users in a HCP Terraform organization. filter.organization\_id is optional — auto-resolved when the connecti...

Get Unified User`terraform_unified_get_user`

Get a unified HCP Terraform user by ID.

Delete Unified User`terraform_unified_delete_user`

Delete a unified HCP Terraform user by ID.

List Notification Configurations`terraform_list_notification_configs`

List notification configurations for a workspace.

Get Notification Configuration`terraform_get_notification_config`

Retrieve details about a notification configuration.

Create Notification Configuration`terraform_create_notification_config`

Create a notification configuration for a workspace.

Update Notification Configuration`terraform_update_notification_config`

Update a notification configuration.

Delete Notification Configuration`terraform_delete_notification_config`

Delete a notification configuration.

List Organizations`terraform_list_organizations`

List all organizations the user has access to.

Get Organization`terraform_get_organization`

Retrieve details about a specific organization.

Create Organization`terraform_create_organization`

Create a new organization.

Update Organization`terraform_update_organization`

Update an existing organization's settings.

Delete Organization`terraform_delete_organization`

Delete an organization and all its resources.

Get Organization Entitlements`terraform_get_organization_entitlements`

Retrieve the entitlement set for an organization.

List Organization Memberships`terraform_list_organization_memberships`

List all memberships for an organization.

List Own Memberships`terraform_list_own_memberships`

List the current user's organization memberships.

Get Organization Membership`terraform_get_organization_membership`

Retrieve details about a specific organization membership.

Invite User To Organization`terraform_invite_user_to_organization`

Invite a user to join an organization.

Remove User From Organization`terraform_remove_user_from_organization`

Remove a user from an organization.

Get Plan`terraform_get_plan`

Retrieve details about a specific plan.

Get Plan JSON Output`terraform_get_plan_json_output`

Retrieve the JSON execution plan by plan ID.

Get Run Plan JSON Output`terraform_get_run_plan_json_output`

Retrieve the JSON execution plan by run ID.

Get Apply`terraform_get_apply`

Retrieve details about a specific apply.

Get Errored State`terraform_get_errored_state`

Recover state from a failed apply.

Create Plan Export`terraform_create_plan_export`

Export a plan for external use.

Get Plan Export`terraform_get_plan_export`

Retrieve details about a plan export.

Download Plan Export`terraform_download_plan_export`

Get download URL for an exported plan.

Delete Plan Export`terraform_delete_plan_export`

Delete an exported plan.

List Projects`terraform_list_projects`

List all projects in an organization.

Get Project`terraform_get_project`

Retrieve details about a specific project.

Create Project`terraform_create_project`

Create a new project in an organization.

Update Project`terraform_update_project`

Update an existing project's configuration.

Delete Project`terraform_delete_project`

Delete an empty project.

Move Workspaces To Project`terraform_move_workspaces_to_project`

Move workspaces into a project.

List Project Tag Bindings`terraform_list_project_tag_bindings`

List tags bound to a project.

Update Project Tag Bindings`terraform_update_project_tag_bindings`

Add or update tag bindings on a project.

List Runs In Workspace`terraform_list_runs_in_workspace`

List all runs for a specific workspace.

List Runs In Organization`terraform_list_runs_in_organization`

List all runs across an organization.

Get Run`terraform_get_run`

Retrieve details about a specific run.

Create Run`terraform_create_run`

Create a new run in a workspace.

Apply Run`terraform_apply_run`

Apply a planned run.

Discard Run`terraform_discard_run`

Discard a run that has not been applied.

Cancel Run`terraform_cancel_run`

Cancel a run that is currently planning or applying.

Force Cancel Run`terraform_force_cancel_run`

Forcefully cancel a run after normal cancel has been initiated.

Force Execute Run`terraform_force_execute_run`

Force execute a pending run.

List Policy Checks`terraform_list_policy_checks`

List policy checks for a run.

Get Policy Check`terraform_get_policy_check`

Retrieve details about a specific policy check.

Override Policy Check`terraform_override_policy_check`

Override a soft-mandatory policy check.

List Run Comments`terraform_list_run_comments`

List comments on a run.

Create Run Comment`terraform_create_run_comment`

Add a comment to a run.

List Run Triggers`terraform_list_run_triggers`

List all run triggers for a workspace.

Get Run Trigger`terraform_get_run_trigger`

Retrieve details about a specific run trigger.

Create Run Trigger`terraform_create_run_trigger`

Create a run trigger to connect workspaces.

Delete Run Trigger`terraform_delete_run_trigger`

Delete a run trigger.

List SSH Keys`terraform_list_ssh_keys`

List the SSH keys in an organization.

List State Versions`terraform_list_state_versions`

List state versions for a workspace.

Get State Version`terraform_get_state_version`

Retrieve details about a specific state version.

Get Current State Version`terraform_get_current_state_version`

Retrieve the current state version for a workspace.

Create State Version`terraform_create_state_version`

Create a new state version for a workspace.

Rollback State Version`terraform_rollback_state_version`

Rollback to a previous state version.

Soft Delete State Version`terraform_soft_delete_state_version`

Mark a state version for garbage collection (Enterprise only).

Restore State Version`terraform_restore_state_version`

Restore a state version marked for garbage collection (Enterprise only).

Permanently Delete State Version`terraform_permanently_delete_state_version`

Permanently delete a state version (Enterprise only).

List State Version Outputs`terraform_list_state_version_outputs`

List outputs for a state version.

Get State Version Output`terraform_get_state_version_output`

Retrieve a specific state version output.

Get Current State Version Outputs`terraform_get_current_state_version_outputs`

List outputs from the current state version of a workspace.

List Teams`terraform_list_teams`

List all teams in an organization.

Get Team`terraform_get_team`

Retrieve details about a specific team.

Create Team`terraform_create_team`

Create a new team in an organization.

Update Team`terraform_update_team`

Update an existing team's configuration.

Delete Team`terraform_delete_team`

Delete a team from an organization.

Add Members To Team`terraform_add_members_to_team`

Add organization members to a team by organization membership ID.

Delete Members From Team`terraform_delete_members_from_team`

Delete organization members from a team by organization membership ID.

Get User`terraform_get_user`

Retrieve details about a specific user.

List Workspace Variables`terraform_list_workspace_variables`

List all variables in a workspace.

Create Workspace Variable`terraform_create_workspace_variable`

Create a new variable in a workspace.

Update Workspace Variable`terraform_update_workspace_variable`

Update an existing workspace variable.

Delete Workspace Variable`terraform_delete_workspace_variable`

Delete a variable from a workspace.

List Variable Sets`terraform_list_variable_sets`

List all variable sets for an organization.

List Project Variable Sets`terraform_list_project_variable_sets`

List all variable sets for a project.

List Workspace Variable Sets`terraform_list_workspace_variable_sets`

List all variable sets for a workspace.

Get Variable Set`terraform_get_variable_set`

Retrieve details about a specific variable set.

Create Variable Set`terraform_create_variable_set`

Create a new variable set in an organization.

Update Variable Set`terraform_update_variable_set`

Update an existing variable set.

Delete Variable Set`terraform_delete_variable_set`

Delete a variable set.

List Variable Set Variables`terraform_list_variable_set_variables`

List all variables in a variable set.

Add Variable To Set`terraform_add_variable_to_set`

Add a variable to a variable set.

Update Variable In Set`terraform_update_variable_in_set`

Update a variable in a variable set.

Delete Variable From Set`terraform_delete_variable_from_set`

Delete a variable from a variable set.

Apply Variable Set To Workspaces`terraform_apply_variable_set_to_workspaces`

Apply a variable set to one or more workspaces.

Remove Variable Set From Workspaces`terraform_remove_variable_set_from_workspaces`

Remove a variable set from one or more workspaces.

Apply Variable Set To Projects`terraform_apply_variable_set_to_projects`

Apply a variable set to one or more projects.

Remove Variable Set From Projects`terraform_remove_variable_set_from_projects`

Remove a variable set from one or more projects.

List Workspaces`terraform_list_workspaces`

List all workspaces in an organization.

Get Workspace`terraform_get_workspace`

Retrieve details about a specific workspace.

Get Workspace By ID`terraform_get_workspace_by_id`

Retrieve details about a workspace using its ID.

Create Workspace`terraform_create_workspace`

Create a new workspace in an organization.

Update Workspace`terraform_update_workspace`

Update an existing workspace's configuration.

Delete Workspace`terraform_delete_workspace`

Delete a workspace and all its data.

Safe Delete Workspace`terraform_safe_delete_workspace`

Safely delete a workspace only if it has no managed resources.

Lock Workspace`terraform_lock_workspace`

Lock a workspace to prevent new runs.

Unlock Workspace`terraform_unlock_workspace`

Unlock a workspace to allow new runs.

Force Unlock Workspace`terraform_force_unlock_workspace`

Force unlock a workspace locked by another user.

Get Workspace Tags`terraform_get_workspace_tags`

List tags attached to a workspace.

Add Workspace Tags`terraform_add_workspace_tags`

Add tags to a workspace.

Delete Workspace Tags`terraform_delete_workspace_tags`

Remove tags from a workspace.

Get Remote State Consumers`terraform_get_remote_state_consumers`

List workspaces that can access this workspace's state.

Add Remote State Consumers`terraform_add_remote_state_consumers`

Add workspaces that can access this workspace's state.

Delete Remote State Consumers`terraform_delete_remote_state_consumers`

Remove workspaces from accessing this workspace's state.

Assign SSH Key`terraform_assign_ssh_key`

Assign an SSH key to a workspace.

## Events

Tags

Select all
|
Clear

Assessments

Notifications

Runs

Webhooks

No tags found

10 events

EventDescriptionTags

Notification Verification`terraform_webhook_verification`

Answers Terraform's verification/test request sent when a webhook notification configuration is enabled.

NotificationsWebhooks

Run Created Webhook`terraform_webhook_run_created`

Processes Terraform run:created events, fired when a run begins and enters the pending stage.

RunsWebhooks

Run Planning Webhook`terraform_webhook_run_planning`

Processes Terraform run:planning events, fired when a run acquires the lock and starts to execute.

RunsWebhooks

Run Needs Attention Webhook`terraform_webhook_run_needs_attention`

Processes Terraform run:needs\_attention events, fired when a plan has changes and requires user input.

RunsWebhooks

Run Applying Webhook`terraform_webhook_run_applying`

Processes Terraform run:applying events, fired when a run enters the apply stage.

RunsWebhooks

Run Completed Webhook`terraform_webhook_run_completed`

Processes Terraform run:completed events, fired when a run completes successfully.

RunsWebhooks

Run Errored Webhook`terraform_webhook_run_errored`

Processes Terraform run:errored events, fired when a run terminates early due to an error or cancellation.

RunsWebhooks

Assessment Check Failure Webhook`terraform_webhook_assessment_check_failure`

Processes Terraform assessment:check\_failure events, fired when one or more continuous validation checks fail.

AssessmentsWebhooks

Assessment Drift Detected Webhook`terraform_webhook_assessment_drifted`

Processes Terraform assessment:drifted events, fired when configuration drift is detected for the first time.

AssessmentsWebhooks

Assessment Failed Webhook`terraform_webhook_assessment_failed`

Processes Terraform assessment:failed events, fired when a health assessment fails to run.

AssessmentsWebhooks


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.