Terrakube
Home
2.21.0
2.21.0
  • Introduction
  • Updates
  • Getting started
    • 📐Architecture
    • 🔐Security
    • 🚀Getting Started
    • 💿Docker Images
    • 🌐Docker Compose
    • 🚗Docker Compose + Traefik
    • 📥Deployment
      • 🔨Helm Chart
      • 🚀Minikube
      • 🔑Minikube + HTTPS
      • ✈️Ingress Configuration
      • 🔐User Authentication (DEX)
      • 💾Storage backend
        • Azure Storage Account
        • Amazon Cloud Storage
        • Google Cloud Storage
        • Minio (S3 compatible)
      • 🛰️Database Backend
        • SQL Azure
        • PostgreSQL
        • MySQL
        • H2
      • 🔐Custom CA Certs
      • ⚙️Custom Terraform CLI Builds
      • 👮Self-Hosted Agents
      • 📶Proxy Configuration
      • 🛡️Token Security
      • 🚦Open Telemetry
    • 🤵User Management
      • Azure Active Directory
      • Google Cloud Identity
      • Amazon Cognito
      • Github
  • 📓User Guide
    • Organizations
      • Creating an Organization
      • Global Variables
      • Team Management
      • API Tokens
      • Templates
        • Default Templates
        • Persistent Context
        • Import Templates
        • UI Templates
        • Filter global variables in jobs
        • Template Scheduling in Jobs
      • Tags
    • VCS Providers
      • Github
      • Github Enterprise
      • GitLab
      • Gitlab EE and CE
      • Bitbucket
      • Azure DevOps
      • SSH
    • Workspaces
      • Overview
      • Creating Workspaces
      • Terraform State
      • Share Workspace State
      • Variables
      • Dynamic Provider Credentials
        • AWS Dynamic Provider Credentials
        • Azure Dynamic Provider Credentials
        • GCP Dynamic Provider Credentials
      • Workspace scheduler
      • API-driven Workflow
      • CLI-driven Workflow
      • Ephemeral Workspaces
      • Actions
        • Developing Actions
          • Quick start
          • Display Criteria
          • Action Types
          • Action Context
          • Action Proxy
        • Built-in Actions
          • Open Documentation
          • Resource Details
          • Open in Azure Portal
          • Restart Azure VM
          • Azure Monitor
          • Open AI
    • Private Registry
      • Publishing Private Modules
      • Using Private Modules
    • Policy Enforcement (OPA)
    • Cost Estimation
    • Drift Detection
    • CI/CD Integration
      • Github Actions
      • Bitbucket
    • Terrakube CLI
      • Getting started
      • Installation
      • Commands
        • terrakube login
        • terrakube logout
        • terrakube organization
          • organization list
          • organization create
          • organization update
          • organization delete
        • terrakube team
          • team list
          • team create
          • team update
          • team delete
        • terrakube workspace
          • workspace list
          • workspace create
          • workspace update
          • workspace delete
          • workspace variable
            • variable list
        • terrakube variable
          • variable update
          • variable delete
          • variable create
        • terrakube job
          • job list
          • job create
        • terrakube module
          • module list
          • module create
          • module update
          • module delete
    • Reference
      • Executor
        • Terraform Execution Flow
        • Terraform Versions
    • Migrating to Terrakube
  • 🎓Learn
    • What is Terrakube
      • Section Overview
      • Terraform in a Nutshell
      • Terraform Challenges at Enterprise Level
      • Introducing Terrakube
      • Summary and Up Next
    • Deploying using Terrakube
  • 📖API
    • 🌟Getting started
    • ⚙️Methods
      • Globalvar
      • Organization
      • Teams
      • Workspace
      • Variables
      • History
      • Jobs
      • Template
      • Schedule
      • Step
      • Module
      • Vcs
      • Provider
      • Personal Access Token
      • Team API Tokens
      • SSH Key
      • Agent
Powered by GitBook
On this page
  • Workspace-Specific Variables
  • Terraform Variables
  • Environment Variables

Was this helpful?

Edit on GitHub
Export as PDF
  1. User Guide
  2. Workspaces

Variables

PreviousShare Workspace StateNextDynamic Provider Credentials

Last updated 11 months ago

Was this helpful?

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 or you can create Global Variables to reuse the same variables across multiple workspaces.

Workspace-Specific Variables

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:

Terraform 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.

Add a Terraform Variable

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:

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.

Finally click the Save variable button and the variable will be created.

Edit a Terraform Variable

Click the Edit button next to the variable you want to edit.

Make any desired changes and click Save variable.

Delete a Terraform Variable

Click the Delete button next to the variable you want to delete.

Click Yes to confirm your action.

Environment Variables

These variables are set in Terraform's shell environment using export.

Add an Environment Variable

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:

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.

Finally click the Save variable button and the variable will be created.

Edit an Environment Variable

Click the Edit button next to the variable you want to edit.

Make any desired changes and click Save variable.

Delete an Environment Variable

Click the Delete button next to the variable you want to delete.

Click Yes to confirm your action.

📓
variables specifically for each workspace
Terraform Variables
Environment Variables