Skip to content

Workspace Variables

There are two ways through which we can apply variable to a workspace. One way is to create a Variable Set which can be applied to a workspace and the other one is to create variables inside the workspace only.

Create variable inside the workspace

  1. Once the workspace is created we need to configure the variables for it.
  2. Click on Go to workspace overview. Workspace overview
  3. Go inside the workspace and click on Configure Variables. Configure Variables
  4. Click on Add Variable.Add Variables
  5. Write the key and the value in the respective fields. All the variables are considered string by default. Creating Variables
  6. There are two options which we need to keep in mind.
    • If we select HCL check box then the value will not be considerd as a string. It is generally used for integers or JSON objects. The type of the variable will be defined in the terraform file. Creating HCL Variables
    • If we select Sensitive then value becomes write-only. Create Sensitive Varialbes
  7. We can create environment variables also by selecting Environment Variable radio button in the Select variable category. Creating Environment variable

Next Steps