Labels
You can add labels to deployment groups and targets with the labels property, which accepts a single label or a list of labels. Deployment groups and targets inherit labels from the deployment group they belong to and can have labels of their own but can't remove the inherited labels.
You can use labels to choose which deployment targets to include in commands. For example, you can deploy only those targets that have a dev label.
Example
Let's add label app to targets dev-environment and prod-environment, and another label others to infra and sandbox targets. We could use these labels to deploy all application targets (targets with the app label).
deployment/targets.yml
1vars:
2 cost-center: 12345
3 budget: 2000
4
5targetsSchema: budget
6
7deploymentGroups:
8 all:
9 configSets: security
10 all/shared:
11 targets:
12 - name: infra
13 deploymentRole: arn:aws:iam::123456789012:role/ExampleAdmin
14 labels: others
15 all/application:
16 configSets: networking
17 targetsSchema: environment
18 deploymentRoleName: deployer
19 all/application/dev:
20 targets:
21 - name: dev-environment
22 accountId: "222244446666"
23 labels: app
24 - name: sandbox
25 accountId: "111133335555"
26 labels: others
27 all/application/prod:
28 targets:
29 - name: prod-environment
30 accountId: "333355557777"
31 labels: app