Docs
Reference

HCP Terraform workspace variables

Export secrets into one HCP Terraform workspace's variables.

Export secrets into one HCP Terraform workspace's variables.

The connection

WhatThis provider
VendorHashiCorp Terraform
Keyhcp-terraform-vars
Availabilityavailable. You can connect it today.
Credential penv holdshcp-terraform-token
Values read backno
Activationon-next-deploy

What it moves

DirectionWhat it does
exportWrites names and values from penv into the store.

HashiCorp Terraform returns no value once it holds one, so penv can write here and cannot read back.

When a written value goes live

on-next-deploy. A new value waits there and arrives with your next deploy.

What happens to a name that exists

DirectionPolicies you can pick
exportcreate_only, overwrite, overwrite_and_prune

How syncs work says what each one does.

How you connect

You paste a credential you already hold. penv seals it and never shows it again.

FieldLabelKindRequiredWhat it is
tokenAPI tokensecret, masked here and sealedyesA team token with Read and write variables. Not an organization token: an organization has only one valid token at a time, so another tool minting one silently kills this sync. Every token expires.

What a mapping asks for

Answered once per environment you map.

FieldLabelKindRequiredAdvancedWhat it is
workspaceIdWorkspace IDtextyesnoFrom the workspace's General Settings page. One workspace per sync.
categoryVariable kindchoiceyesyesEnvironment variables reach the run's shell. A Terraform input your configuration does not declare is stored and then ignored. One of Environment variable, Terraform input variable. Starts at env.

Permissions it needs

penv probes for these when it verifies the connection.

PermissionDirectionsBlockingWithout it
account:readevery directionyesWe cannot confirm this token is live, or which account it acts as.
workspace:read-variablesexportyesExport cannot enumerate existing variables, so it cannot update or prune safely.
workspace:write-variablesexportyesExport cannot write anything.