Add Environment Variables to an Environment

To add an environment variable in the Coherence UI, navigate to your environment homepage, open the Variables tab, and click the New variable button.

You can use the New variables button to create four types of environmental variables (standard, secret, alias, or output) or to bulk import pre-existing variables.

The optional Service Scope in the Advanced dropdown of each new variable form will determine whether the variable is present in all services (including integration tests, if configured) or just one service.

If an environment variable contains spaces, it must be wrapped in double quotes when entered in the Value field of a new variable form. For example, MY ENVIRONMENT VARIABLE would be entered as follows:

"MY ENVIRONMENT VARIABLE"

To add a standard environment variable:

  • Select Standard from the dropdown.
  • Update the New variable form with the variable Name and Value.
  • Click Create.

To add a secret environment variable:

  • Select Secret from the dropdown.
  • If you choose to Create from an existing cloud secret, update the New secrete form by checking the box and entering the variable Name and Secret ID.
  • If you choose not to Create from an existing cloud secret, update the New secrete form with the variable Name and Value.
  • Click Create.

To add an alias environment variable:

  • Select Alias from the dropdown.
  • Update the New alias form with the Alias Name and Alias Source.
  • Click Add.

To add an output environment variable:

  • Select Output from the dropdown.
  • Update the New output variable form with the Variable Name and Output Name.
  • Click Add.

To bulk import variables:

  • Select Bulk import from the dropdown.
  • Paste a .env file in the dialog.
  • Choose whether you want the variables to Import as secrets by checking the box or leaving it as is.
  • Click Import.