Skip to main content
A variable is a value that you can reuse across all the services within an access bundle. You define the variable once and give it a key, such as GITHUB_TOKEN. Then, any service in the access bundle can use the variable by referencing the key within double braces: {{GITHUB_TOKEN}}. When an agent sends a request, the proxy replaces each reference with the variable’s value.
Only Agent Vault admins can view and update variables.

Add a variable

To add a variable to an access bundle:
1
In Agent Vault, go to Access Bundles and select your access bundle.
The on-call access bundle's page, with its Services list and an empty Variables card with an Add Variable button
2
Under Variables, select Add Variable.
The Add Variable dialog with GITHUB_TOKEN as the key, a hidden value, and Secret selected
3
Enter a Key and a Value.
A key must start with a letter, use only uppercase letters, numbers, and underscores, and can be up to 64 characters long. Two variables in the same access bundle can’t have the same key.
4
Leave Secret selected to hide the value once you save it. If you’re storing something that isn’t sensitive, such as an organization ID, clear Secret so the value stays visible in the list.
5
Select Add Variable. The variable appears in the Variables list.
The on-call access bundle's Variables list with GITHUB_TOKEN, its value hidden, and Unused in the Used By column
An access bundle can hold up to 100 variables.

Use a variable in a service

You can use a variable in the following fields when configuring a service: To use a variable:
1
Add a service, or open an existing service’s actions menu and select Edit. Then go to the Credential step.
2
In a field that accepts variables, type {{. A list of the bundle’s variables appears.
The Credential step of a GitHub service, with a partly typed reference in the Token field and a list showing GITHUB_TOKEN and Create GITHUB_
3
Select a variable from the list. Infisical inserts the reference, such as {{GITHUB_TOKEN}}.
You can also create a variable without leaving the service. Type its key, then select Create at the end of the list. The Add Variable dialog opens with the key filled in, so you only need to enter a Value.
The Credential step of a GitHub service with a GITHUB_TOKEN reference as the Token, and the Sends preview showing the reference after Authorization: Bearer
A reference can fill a whole field or part of one. For example, if a custom header’s Value is org-{{ORG_ID}}, the proxy sends org- followed by the value of ORG_ID.

Check variable usage

To check which services are using a variable:
1
In Agent Vault, go to Access Bundles and select the variable’s access bundle.
2
In the Variables list, find the variable’s Used By column. The column shows an icon for each service that uses the variable, or Unused if no service uses it.
3
Hover over an icon to view the service’s name.

Update a variable

To update a variable:
1
In Agent Vault, go to Access Bundles and select the variable’s access bundle.
2
In the Variables list, open the variable’s actions menu and select Edit.
3
Update the key, the value, or whether the value is secret. If the variable is secret, leave Value blank to keep the current value.
4
Select Save.
If you rename a variable, the services that use it keep working without changes. If you change a variable’s value, the proxy sends the new value within one poll interval (60 seconds by default). Any running agents will begin using the new value automatically.

Delete a variable

To delete a variable:
1
In Agent Vault, go to Access Bundles and select the variable’s access bundle.
2
In the Variables list, open the variable’s actions menu and select Delete.
3
Select Delete Variable.
If any service still uses the variable, the dialog lists those services, and you can’t delete the variable until you remove the reference from each one.