Create or update a variable CDI
Define variables and set their values in components, collections, and deployables.
Before you begin
Important: Starting with the Washington D.C. release, DevOps Config is being prepared for future deprecation. It will be hidden and no longer activated on new instances but will continue to be supported.
Role required: cdm_editor or cdm_admin
About this task
Important: Save your changes whenever you are confident of the changes and before you leave the Config data tab.
- When you create an application, the system auto-generates an empty vars folder in each of the three top-level folders: component, collection, and deployable.
- When you add a collection or deployable, the system adds an empty vars folder to the item that you created.
- A vars folder can contain only variable CDIs or folders. Any subfolder can contain only variables or folders.
- The value of a variable in a collection overrides the value of the variable in a component.
- The value of a variable in a deployable overrides the value of the variable in a collection or component.
Procedure
Use either of the following methods to edit or add an instance of a variable while working in a changeset:
Edit directly in the editing panel. Use the following format to set the value of a variable:
"<variableName>": "<value>"In this example, the dbName variable and several others reside in the database folder. In addition, the backup folder (a child of the database folder) holds the dbServer variable.
A var folder and its contents
- Create the variable in a dialog box. Follow the procedure in the next step.
- Select the more actions menu icon (
More actions icon.\) for the appropriate **vars** folder, select **Create variable**, and then specify its settings.
| Name | Unique and meaningful name for the variable. |
| Value | Value that the variable has in the current context. Tip: It is often useful to define a default value for a variable in a component or collection. This is a powerful strategy because you can create a broad variety of deployables from a small set of components and collections. Deployables that inherit a component or collection can use overrides, overlays, and variable settings to meet the needs of the environment type. For example, the |
| Encrypted | Option to specify that the value of the variable should be encrypted. The option appears only for users with the CDM Secrets [sn_cdm.cdm_secrets] role. After you create the variable, the value appears in all views as |