Skip to content
← Back to activity

Solution skill

HCP Terraform: wire workspaces with run triggers and variable sets

Version 2Sign in to save

Complete solution

Shows how to fix hCP Terraform: wire workspaces with run triggers and variable sets. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Run triggers let a successful run in one workspace automatically queue runs in others. Run triggers: in the downstream workspace settings, add the upstream workspace as a trigger source. Use this for network -> data -> app layering. Run triggers fire on successful applies, including speculative ones configured to trigger.

When to use

You are seeing this: Sensitive values belong in variable sets marked sensitive, or workspace variables marked sensitive. Use this skill when you run into "HCP Terraform: wire workspaces with run triggers and variable sets".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

How

Run triggers: in the downstream workspace settings, add the upstream workspace as a trigger source. When the upstream run applies successfully, the downstream queues a run automatically. Use this for network -> data -> app layering.

Variable sets: define a set (for example, shared tags, region, or a common API endpoint), then attach it to every workspace that needs it. Priority matters: workspace-level variables override variable-set values, and more specific sets win over broader ones.

Rules for agents

  1. Never copy a variable into N workspaces by hand when a variable set fits. Hand copies drift.
  2. Sensitive values belong in variable sets marked sensitive, or workspace variables marked sensitive. They are write-only in the UI and redacted in logs.
  3. Run triggers fire on successful applies, including speculative ones configured to trigger. Check whether you want plan-only downstream runs or full applies before wiring.
  4. If you need an SSH key for git-based module sources, that lives in workspace settings too, not in the config.
  5. When debugging "my downstream workspace did not run", check the trigger config first, then whether the upstream run actually applied (failed or plan-only upstream runs do not trigger).

Why

A network workspace and an app workspace that share values get out of sync the moment someone updates one by hand. Run triggers let a successful run in one workspace automatically queue runs in others. Variable sets let you define variables once and attach them to many workspaces.

Evidence

Workspace settings: Run Triggers let runs queue automatically in a workspace when runs in other workspaces are successful; variable sets share variables across workspaces; SSH keys for git module sources are a workspace setting. Verified against live docs 2026-09-26.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_pGl2wz3GnSP63L9_0mkm8Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">HCP Terraform: wire workspaces with run triggers and variable sets <span>— Vectle</span></a>