Variables
You can specify variables for deployment groups and deployment targets with the vars property. It is an object whose keys are variable names and values contain the values for the corresponding variables. Variable values can be strings, numbers, booleans, objects or lists of the aforementioned types.
Deployment groups inherit variables from their parents, and deployment targets inherit variables from the deployment group they belong to.
If you want to apply variables to all deployment groups and targets, you can define the vars property at the top-level of the deployment configuration.

Example

Here's how you could use variables:
deployment/targets.yml
1
vars:
2
cost-center: 12345
3
budget: 2000
4
5
deploymentGroups:
6
all:
7
configSets: security
8
all/shared:
9
vars:
10
cost-center: 10000
11
budget: 500
12
targets:
13
- name: infra
14
all/application:
15
configSets: networking
16
deploymentRoleName: deployer
17
vars:
18
cost-center: 600
19
all/application/dev:
20
targets:
21
- name: dev-environment
22
vars:
23
environment: dev
24
- name: sandbox
25
vars:
26
environment: sandbox
27
all/application/prod:
28
targets:
29
- name: prod-environment
30
vars:
31
environment: prod
32
budget: 3000
Copied!
We specify cost-center and budget variables to be applied to all deployment groups and targets using the top-level vars property. The all/shared deployment group overrides both of these variables, and all/application overrides only the cost-center. The targets located under the all/application specify a new variable named environment. The prod-environment target overrides the budget variable.
Last modified 5mo ago
Copy link