Skip to main content
Feedback

Creating an environment variable

Create an environment variable to store and manage a common value that you want to change for each environment.

When you create a variable in an environment, you must name it and assign a value to it for that environment. A variable of the same name is also then added to all other environments, but with a blank value that you must define.

To create an environment variable:

  1. Navigate to Settings > Environments.
  2. From the Environment pane, click the manage button for an environment (for example, Manage Production).
  3. Click the Variables tab.
  4. Click Create a new environment variable.
  5. Name: Enter a name for the variable. This is used when inserting the variable.
  6. Value: Enter the value for the variable. This value accepts any combination of alpha, numeric, and special characters.
  7. Value Kind: Select the desired Value kind:
    • String. Type the string value in the Value field.
    • Code. Select the code type as yaml, json or html from the drop-down and enter the value in the Value field.
  8. Is Secret: Select this radio button to specify that the value should be masked. On selecting this, the value will not be visible at designtime or runtime.
  9. Click Save to create the variable in the environment.
  10. Navigate back to Settings > Environments page and enter a value for the variable in each environment.
    • A variable of the same name is added to all other environments, but with a blank value that you must now define.
    • You can insert the contents of the variable into a number of areas, such as in an existing value, or into the content of a step. Refer to Inserting an environment variable.