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 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.
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.ymlvars:cost-center: 12345budget: 2000targetsSchema: budgetdeploymentGroups:all:configSets: securityall/shared:targets:- name: infradeploymentRole: arn:aws:iam::123456789012:role/ExampleAdminlabels: othersall/application:configSets: networkingtargetsSchema: environmentdeploymentRoleName: deployerall/application/dev:targets:- name: dev-environmentaccountId: "222244446666"labels: app- name: sandboxaccountId: "111133335555"labels: othersall/application/prod:targets:- name: prod-environmentaccountId: "333355557777"labels: app