Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can use Microsoft Fabric variable libraries to manage configurations across stages of the release pipeline and to save values in Git. This article explains how to use variable libraries in the context of lifecycle management and continuous integration and continuous delivery (CI/CD).
Note
The Fabric variable library item is currently in preview.
Variable libraries and deployment pipelines
You can deploy variable libraries and their values in deployment pipelines to manage variable values across stages.
Remember this important information:
All value sets in the variable library are available to all stages of the deployment pipeline, but only one set is active in a stage.
The active value set for each stage is selected independently. You can change it anytime.
When you first deploy or commit a variable library, the library's active set has the default value. You can change this value by accessing the newly created variable library in the target stage or repository and changing the active set.
Although deployments don't affect the selected active value set in each stage, you can update the values themselves in the variable library. The consumer item in its workspace (for example, a pipeline) automatically receives the correct value from the active value set.
The following operations to variables or value sets in one stage of a deployment pipeline cause the variable library to be reflected as Different form source compared to the same item in a different stage:
- Added, deleted, or edited variables
- Added or deleted value sets
- Names of variables
- Order of variables
A simple change to the active value set doesn't register as Different form source when you compare. The active value set is part of the item configuration, but it's not included in the definition. That's why it doesn't appear on the deployment pipeline comparison and isn't overwritten on each deployment.
Variable libraries and Git integration
Like other Fabric items, variable libraries can be integrated with Git for source control. Variable library items are stored as folders that you can maintain and sync between Fabric and your Git provider.
Item permissions are checked during Git update and commit.
The schema for the variable library item is a JSON object that contains four parts:
- Folder for value sets
- Settings
- Platform.json, an automatically generated file
- Variables
Value sets
The variable library folder contains a subfolder called valueSets
. This folder contains a JSON file for each value set. This JSON file contains only the variable values for non-default values in that value set.
For more information about the value set file, see the value set example.
Values for variables not in this file are taken from the default value set.
Settings
The settings.json
file contains settings for the variable library.
For more information, see the settings.json example.
Variables
The variables.json
file contains the variable names and their default values.
For more information, see the variables.json example.
Considerations and limitations
Size limitations
There can be up to 1,000 variables and up to 1,000 value sets, as long as you meet both of these requirements:
- The total number of cells in the alternative value sets is less than 10,000.
- The item's size doesn't exceed 1 MB.
These requirements are validated when you save changes.
The note field can have up to 2,048 characters.
The value-set description field can have up to 2,048 characters.
Limitations for alternative value sets
- Alternative value sets in a variable library appear in the order in which you added them. Currently, you can't reorder them in the UI. To change the order, edit the JSON file directly.
- The name of each value set must be unique within a variable library.
- Variable names must be unique within a variable library. You can have two variables with the same name in a workspace if they're in different items.
- There's always one (and only one) active value set in a variable library at a time. You can't delete a value set while it's active. To delete it, first configure another value set to be active. You can have a different active value set for each stage of a deployment pipeline.