Filtering Secrets and Configurations

Filtering Secrets and Configurations

The filtering functionality for Secrets and Configs helps make it easier to organize these environment variables based on their naming conventions. When you enter the name of a new variable in the “Secret Key” or “Config Key” box, that variable name will be split into individual segments separated by underscores.

The naming convention that the filtering system uses consists of up to four parts:

  1. Cloud
  2. Environment
  3. Application
  4. Key

For example, if you enter the string CLOUD1_MYENV2_APP3_KEY4 as the name of a “Secrets” or “Configs” variable, the following segments are parsed from the string:

  • Clouds: CLOUD1
  • Environments: ENV2
  • Applications: APP3
  • Key: KEY4

Accessing the Variables

⚠️
Accessing Variables by Name
Note that this is purely a naming convention—it won’t have any direct effect on the behavior of your applications.

Accessing these variables from your deployed application will require you to use the fully-qualified variable name you entered on the dashboard, e.g. CLOUD1_ENV2_APP3_KEY4:

When a variable’s name is parsed, the underscore-separated segments are interpreted from right to left. If the variable name doesn’t contain any underscores, the lone segment will be treated as the key. However, if, for example, the variable name contains three segments, they will be interpreted as the key, application, and environment, going from right to left:

Full Variable NameCloudEnvironmentApplicationKey
A_B_C_DABCD
A_B_CABC
A_BAB
AA
ℹ️
Default Values for “Environments”
When you are creating your first secret or config variable, the dropdown boxes for “Clouds” and “Applications” will be empty, while the “Environments” dropdown is populated with the most common environment names: DEV, STG, and PROD.

Filtering variables by name

After you have created some secrets or configs, the dropdown boxes will be populated with values parsed from the names of the environment variables you have already defined.

For example, if you have multiple variables defined for one environment on a specific cloud, choosing values for “Clouds” and “Environments” will show you only the environment variables that match these two conditions, and the “Applications” box will be populated with the existing values:

The purpose of the dropdown boxes is to make it easier for you to establish and follow a consistent naming convention when you have many config or secret variables to manage across several clouds, environments, and applications.

When a new value is chosen from one of the dropdown boxes, the relevant segment of the variable’s name will be replaced with the selected value: