Built-In Variables
Introduction
Bunnyshell automatically creates and injects a number of Built-In Variables. Users can view and edit them by accessing the env.yaml file. Depending on the level where they are defined, we can identify two types of Built-In Variables:
Environment Built-In Variables
Component Built-In Variables
When an environment is deployed, all Built-In Variables are injected as environment variables.
Environment Built-In Variables
At the environment level, Built-In Variables can be seen under the top level builtinVariables key inside the env.yaml file.
A variable is created for every hostname of every component within the environment.
The IDs of Built-In Variables for hostnames have the following format:
BNS_INGRESS_URL_[component name]_[index number]Their values have the following format:
[hostname]/[path]
BNS_ is a reserved prefix and cannot be used when creating other variables.
Component Built-In Variables
At the component level, the only Built-In Variable is BNS_GIT_BRANCH. It can be seen for each component under the builtinVariables key.
Built-In Variables can be referenced under the envVarMapping key using the following format:
[name of your variable]: [name of referenced built-in variable]
Last updated
Was this helpful?
