Custom n8n nodes to work with HashiCorp Terraform Cloud: manage runs, workspaces, projects, and state metadata.
- TerraformCloud: Run operations (create plan/manual apply, apply, cancel, discard, add comment), list runs by workspace, get run status, list projects, list workspaces, fetch latest workspace state metadata.
- Create plan-only runs or plans that wait for manual apply in a workspace.
- Apply, cancel, or discard an existing run.
- Add comments to a run.
- List runs per workspace or fetch the status of a specific run.
- Create workspaces with vcs, variables, executions, directories...
- List workspaces in an organization.
- Fetch workspace details (includes current/latest run).
- Fetch the current workspace state (state version + download URL).
- List projects in an organization.
You will need an api token credential to interact with Terraform Cloud.
To create a workspace whose VCS source is a GitHub App, you must use a User API Token.
An Organization API Token is not sufficient for this purpose.
- Click on your profile picture in the upper-right corner.
- Go to Account Settings.
- Navigate to Tokens.
- Click Create API Token.
-
TerraformCloud node → Resource
Run→ OperationCreate Plan (Manual Apply)→ set Workspace ID + message.

-
TerraformCloud node → Resource
Run→ OperationGet Status→ use therunIdfrom step 1.

- TerraformCloud node → Resource
Workspace→ OperationGet Workspace State. - Provide
workspaceIdor enableResolve Workspace by NamewithstateOrganization+workspaceName.

- TerraformCloud node → Resource
Run→ OperationCreate a Workspace.There are a multiple options on the creations: vcs control, auto apply, variables...
- Terraform Cloud API token with access to the target organization/workspaces.
- n8n 1.0+ (tested on 2.0.3).
npm install
npm run dev # starts n8n with the custom nodes linkednpm run build
npm run lint

