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
| What | This provider |
|---|---|
| Vendor | HashiCorp Terraform |
| Key | hcp-terraform-vars |
| Availability | available. You can connect it today. |
| Credential penv holds | hcp-terraform-token |
| Values read back | no |
| Activation | on-next-deploy |
What it moves
| Direction | What it does |
|---|---|
export | Writes 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
| Direction | Policies you can pick |
|---|---|
export | create_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.
| Field | Label | Kind | Required | What it is |
|---|---|---|---|---|
token | API token | secret, masked here and sealed | yes | A 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.
| Field | Label | Kind | Required | Advanced | What it is |
|---|---|---|---|---|---|
workspaceId | Workspace ID | text | yes | no | From the workspace's General Settings page. One workspace per sync. |
category | Variable kind | choice | yes | yes | Environment 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.
| Permission | Directions | Blocking | Without it |
|---|---|---|---|
account:read | every direction | yes | We cannot confirm this token is live, or which account it acts as. |
workspace:read-variables | export | yes | Export cannot enumerate existing variables, so it cannot update or prune safely. |
workspace:write-variables | export | yes | Export cannot write anything. |