Skip to content
For LLMsView as Markdown·

Terraform Cloud

Manage infrastructure as code with Terraform Cloud workspaces, runs, and state.

DetailValue
CategoryDevOps
Base URLhttps://app.terraform.io/api/v2
AuthenticationBearer Token
Endpoints8
Connector keyterraform-cloud

Using Terraform Cloud in a workflow

  1. Go to Connections and click New Connection.
  2. Pick Terraform Cloud from the marketplace.
  3. Enter your credentials (see Authentication above for what's expected).
  4. In a workflow, drop an API Call node and select this connection.
  5. Pick the operation you need from the Operation dropdown — the full list is below.

Available endpoints

EndpointSummary
GET /organizationsList organizations
GET /organizations/{organization_name}/workspacesList workspaces
POST /organizations/{organization_name}/workspacesCreate a workspace
GET /workspaces/{workspace_id}Get workspace details
POST /runsCreate a run
GET /runs/{run_id}Get run details
POST /runs/{run_id}/actions/applyApply a run
GET /workspaces/{workspace_id}/current-state-versionGet current state

Each endpoint is documented in full below. Use the outline on the right to jump to one.

GET /organizations

List organizations

DetailValue
Operation IDdevops.listOrganizations
MethodGET
Path/organizations

Parameters

No parameters.

Using this endpoint in a workflow

  1. Add an API Call node to your workflow.
  2. Pick your Terraform Cloud connection from the Connection dropdown.
  3. In the Operation dropdown, select devops.listOrganizations.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

What it returns

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Terraform Cloud API reference.

GET /organizations/{organization_name}/workspaces

List workspaces

DetailValue
Operation IDdevops.listWorkspaces
MethodGET
Path/organizations/{organization_name}/workspaces

Parameters

No parameters.

Using this endpoint in a workflow

  1. Add an API Call node to your workflow.
  2. Pick your Terraform Cloud connection from the Connection dropdown.
  3. In the Operation dropdown, select devops.listWorkspaces.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

What it returns

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Terraform Cloud API reference.

POST /organizations/{organization_name}/workspaces

Create a workspace

DetailValue
Operation IDdevops.createWorkspace
MethodPOST
Path/organizations/{organization_name}/workspaces

Parameters

No parameters.

Using this endpoint in a workflow

  1. Add an API Call node to your workflow.
  2. Pick your Terraform Cloud connection from the Connection dropdown.
  3. In the Operation dropdown, select devops.createWorkspace.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

What it returns

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Terraform Cloud API reference.

GET /workspaces/{workspace_id}

Get workspace details

DetailValue
Operation IDdevops.getWorkspace
MethodGET
Path/workspaces/{workspace_id}

Parameters

No parameters.

Using this endpoint in a workflow

  1. Add an API Call node to your workflow.
  2. Pick your Terraform Cloud connection from the Connection dropdown.
  3. In the Operation dropdown, select devops.getWorkspace.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

What it returns

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Terraform Cloud API reference.

POST /runs

Create a run

DetailValue
Operation IDdevops.createRun
MethodPOST
Path/runs

Parameters

No parameters.

Using this endpoint in a workflow

  1. Add an API Call node to your workflow.
  2. Pick your Terraform Cloud connection from the Connection dropdown.
  3. In the Operation dropdown, select devops.createRun.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

What it returns

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Terraform Cloud API reference.

GET /runs/{run_id}

Get run details

DetailValue
Operation IDdevops.getRun
MethodGET
Path/runs/{run_id}

Parameters

No parameters.

Using this endpoint in a workflow

  1. Add an API Call node to your workflow.
  2. Pick your Terraform Cloud connection from the Connection dropdown.
  3. In the Operation dropdown, select devops.getRun.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

What it returns

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Terraform Cloud API reference.

POST /runs/{run_id}/actions/apply

Apply a run

DetailValue
Operation IDdevops.applyRun
MethodPOST
Path/runs/{run_id}/actions/apply

Parameters

No parameters.

Using this endpoint in a workflow

  1. Add an API Call node to your workflow.
  2. Pick your Terraform Cloud connection from the Connection dropdown.
  3. In the Operation dropdown, select devops.applyRun.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

What it returns

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Terraform Cloud API reference.

GET /workspaces/{workspace_id}/current-state-version

Get current state

DetailValue
Operation IDdevops.getCurrentStateVersion
MethodGET
Path/workspaces/{workspace_id}/current-state-version

Parameters

No parameters.

Using this endpoint in a workflow

  1. Add an API Call node to your workflow.
  2. Pick your Terraform Cloud connection from the Connection dropdown.
  3. In the Operation dropdown, select devops.getCurrentStateVersion.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

What it returns

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream Terraform Cloud API reference.