Variables
Last updated
Last updated
Terrakube workspace variables let you customize configurations and store information like static provider credentials. You can also reference this variables inside your Templates.
You can set variables specifically for each workspace or you can create Global Variables to reuse the same variables across multiple workspaces.
To view and manage a workspace's variables, go to the workspace and click the Variables tab.
The Variables page appears, showing all workspace-specific variables. This is where you can add, edit, and delete workspace-specific variables.
There are 2 kinds of Variables:
These Terraform variables are set using a terraform.tfvars file. To use interpolation or set a non-string value for a variable, click its HCL checkbox.
Go to the workspace Variables page and in the Terraform Variables section click the Add variable button.
In the popup, provide the required values. Use the below table as reference:
Finally click the Save variable button and the variable will be created.
Click the Edit button next to the variable you want to edit.
Make any desired changes and click Save variable.
Click the Delete button next to the variable you want to delete.
Click Yes to confirm your action.
These variables are set in Terraform's shell environment using export.
Go to the workspace Variables page and in the Environment Variables section click the Add variable button.
In the popup, provide the required values. Use the below table as reference:
Finally click the Save variable button and the variable will be created.
Click the Edit button next to the variable you want to edit.
Make any desired changes and click Save variable.
Click the Delete button next to the variable you want to delete.
Click Yes to confirm your action.
Field | Description |
---|---|
Field | Description |
---|---|
Key
Unique variable name
Value
Key value
Description
Free text to document the reason for this global variable
HCL
Parse this field as HashiCorp Configuration Language (HCL). This allows you to interpolate values at runtime.
Sensitive
Sensitive variables are never shown in the UI or API. They may appear in Terraform logs if your configuration is designed to output them.
Key
Unique variable name
Value
Key value
Description
Free text to document the reason for this global variable
HCL
Parse this field as HashiCorp Configuration Language (HCL). This allows you to interpolate values at runtime.
Sensitive
Sensitive variables are never shown in the UI or API. They may appear in Terraform logs if your configuration is designed to output them.