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

string
required
The ID of the run to apply.
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

string
required
The name of the variable.
string
required
The value of the variable.
string
required
The ID of the workspace to create the variable in.
string
Whether this is a Terraform variable or environment variable.Default: "terraform".Allowed values: terraform, env.
boolean
Whether the value is in HCL format.Default: false.
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

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

string | null
The organization name. Required if workspace_id is not provided.Default: null.
string | null
The workspace ID. If provided, organization and workspace_name are ignored.Default: null.
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

string
required
The name of the Terraform Cloud organization.
integer
The page number to return.Default: 1.
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

string
required
The ID of the workspace to list runs for.
integer
The page number to return.Default: 1.
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

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

string
required
The name of the Terraform Cloud organization.
integer
The page number to return.Default: 1.
integer
The number of workspaces to return per page.Default: 20.
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

string
required
The ID of the workspace to create the plan run for.
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

string
required
The ID of the workspace to refresh state for.
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

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