Skip to main content

Apply run

Action ID: tools.terraform.apply_run Apply a planned Terraform Cloud run to execute infrastructure changes. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/run

Secrets

Required secrets:
  • terraform: required values TERRAFORM_API_TOKEN.

Input fields

run_id
string
required
The ID of the run to apply.
comment
string | null
Optional comment explaining why the run is being applied.Default: null.

Create workspace variable

Action ID: tools.terraform.create_workspace_variable Create a new variable in a Terraform Cloud workspace. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/workspace-variables

Secrets

Required secrets:
  • terraform: required values TERRAFORM_API_TOKEN.

Input fields

key
string
required
The name of the variable.
value
string
required
The value of the variable.
workspace_id
string
required
The ID of the workspace to create the variable in.
category
string
Whether this is a Terraform variable or environment variable.Default: "terraform".Allowed values: terraform, env.
hcl
boolean
Whether the value is in HCL format.Default: false.
sensitive
boolean
Whether the value is sensitive and should be hidden in the UI.Default: false.

Get run details

Action ID: tools.terraform.get_run_details Get details for a specific Terraform Cloud run. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/run

Secrets

Required secrets:
  • terraform: required values TERRAFORM_API_TOKEN.

Input fields

run_id
string
required
The ID of the run to get details for.

Get workspace details

Action ID: tools.terraform.get_workspace_details Get details for a workspace by ID or by organization and workspace name. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/workspaces

Secrets

Required secrets:
  • terraform: required values TERRAFORM_API_TOKEN.

Input fields

organization
string | null
The organization name. Required if workspace_id is not provided.Default: null.
workspace_id
string | null
The workspace ID. If provided, organization and workspace_name are ignored.Default: null.
workspace_name
string | null
The workspace name. Required if workspace_id is not provided.Default: null.

List projects

Action ID: tools.terraform.list_projects List all projects in a Terraform Cloud organization. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/projects

Secrets

Required secrets:
  • terraform: required values TERRAFORM_API_TOKEN.

Input fields

organization
string
required
The name of the Terraform Cloud organization.
page[number]
integer
The page number to return.Default: 1.
page[size]
integer
The number of projects to return per page.Default: 20.

List runs

Action ID: tools.terraform.list_runs List all runs for a Terraform Cloud workspace. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/run

Secrets

Required secrets:
  • terraform: required values TERRAFORM_API_TOKEN.

Input fields

workspace_id
string
required
The ID of the workspace to list runs for.
page[number]
integer
The page number to return.Default: 1.
page[size]
integer
The number of runs to return per page.Default: 20.

List workspace variables

Action ID: tools.terraform.list_workspace_variables List all variables configured for a Terraform Cloud workspace. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/workspace-variables

Secrets

Required secrets:
  • terraform: required values TERRAFORM_API_TOKEN.

Input fields

workspace_id
string
required
The ID of the workspace to list variables for.

List workspaces

Action ID: tools.terraform.list_workspaces List all workspaces in a Terraform Cloud organization, optionally filtered by project. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/workspaces

Secrets

Required secrets:
  • terraform: required values TERRAFORM_API_TOKEN.

Input fields

organization
string
required
The name of the Terraform Cloud organization.
page[number]
integer
The page number to return.Default: 1.
page[size]
integer
The number of workspaces to return per page.Default: 20.
project_id
string | null
Optional project ID to filter workspaces by project.Default: null.

Plan run

Action ID: tools.terraform.plan_run Create a plan-only run in Terraform Cloud to preview infrastructure changes. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/run

Secrets

Required secrets:
  • terraform: required values TERRAFORM_API_TOKEN.

Input fields

workspace_id
string
required
The ID of the workspace to create the plan run for.
message
string | null
Optional message to describe the purpose of the run.Default: null.

Refresh state

Action ID: tools.terraform.refresh_state Create a refresh-only run to update Terraform state with real infrastructure. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/run

Secrets

Required secrets:
  • terraform: required values TERRAFORM_API_TOKEN.

Input fields

workspace_id
string
required
The ID of the workspace to refresh state for.
message
string | null
Optional message to describe the purpose of the refresh.Default: null.

Update workspace variable

Action ID: tools.terraform.update_workspace_variable Update an existing variable in a Terraform Cloud workspace. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/workspace-variables

Secrets

Required secrets:
  • terraform: required values TERRAFORM_API_TOKEN.

Input fields

variable_id
string
required
The ID of the variable to update.
workspace_id
string
required
The ID of the workspace containing the variable.
hcl
boolean | null
Whether the value is in HCL format.Default: null.
key
string | null
The name of the variable. Only required if changing the key.Default: null.
sensitive
boolean | null
Whether the value is sensitive.Default: null.
value
string | null
The value of the variable. Only required if changing the value.Default: null.