Variables¶
Variables are used to store additional configuration throughout the Dune structure. Each Variable has a Name, a Value and a Type.

Variables and how they propagate through the core elements
Types¶
Following Variable types are supported:
| Type | Example |
|---|---|
| String | "test23" |
| Number | 1234 or 12,50 |
| Boolean | true / false |
| List | "one", "two", "three" |
Inheritance¶
Variables are inherited automatically through the structure (see Diagram above). For example a Deployment has it's own variable but additionally also inherites the variables from its parent collection and tenant. This is a powerfull mechanism and allows to define a variable on certain level which is then taken into account on all child levels as well.

Example of variable inheritance
Scoping¶
When variables are defined on levels which are not environment specific (Tenant, Collection), there is an option to scope them to one specific environment. The variable will then only apply to child levels which have that specific environment assigned.

Example of variable scoping
Precedence¶
If variables with the same name are inherited, the one variable closer to the element takes precedence. For example: There's a variable on a collection called CostCenter and a variable with the same name CostCenter is also defined on a child deployment, then the variable from the deployment overrides the one from the parent collection.

Example of variable precedence