Contexts
A context can be used to define global variables that will be used across different environment templates and resource templates. For example, there could be a fixed endpoint for pulling container images. Config contexts are used in environment or resource templates.
Create a Context
- In a project, select Environments > Contexts.
- Select New Context.
- Enter a name for the context. Optionally, type a description.
- Select Create. The context is created and the configuration page displays.
- Select Environment variables.
- Select Add Environment variable.
- Enter an environment key and value. See below for more details about environment keys and values.
- Select Sensitve to obfuscate the information.
- Select File paths.
- Select Add File Paths.
- Enter a name and data for the file path. See below for more details about file path configuration.
- Select Sensitive to obfuscate the information.
- Select Variables.
- Select Add Variable.
- Enter a name for the variable. Optionally, type a description.
- Enter the values and select the types for this variable. See below for more details about values and types.
- Select Save to save the context. Click Cancel to close the configuration and go back to the context list.
Context Configuration
General
Setting |
Description |
Name |
Enter a name for the context. |
Description |
Enter a description for the resource. This is optional. |
Environment Variables
Setting |
Description |
Environment Key |
Enter the environment key. |
Value |
Enter the value for the environment key. |
Sensitive |
Selecting Sensitive will obfuscate the value so it cannot be read after saving the context. |
File Paths
Setting |
Description |
Name |
Enter a name for the file path. |
Data |
Enter the file path. |
Sensitive |
Selecting Sensitive will obfuscate the value so it cannot be read after saving the context. |
Setting |
Description |
Name |
The name of the variable. |
Description |
A brief description of the variable. |
Value |
The variable value. This could be |
Value Type |
The type of value. |
-- HCL |
Hashicorp configuration language |
-- JSON |
JavaScript Object Notation (JSON) is a lightweight data-interchange format. |
-- Expressions |
Expressions are valid units of code that resolve to a value. |
-- Text |
Text value. |
Override Type |
Controls if a user can change a variable or not. |
-- Allowed |
Allows the user to override the value. |
-- Not Allowed |
Does not allow the user to override the value. |
-- Restricted |
Allows the user to override the value by selecting a different, pre-defined value. |
Restricted Values |
If Restricted is selected for the Override Type, enter the values that are allowed. |
Sensitive |
Does not display the value in the UI. |
Required |
The variable is required when using this Context. |