Config sets

Config set directory and files

Config sets are standard Takomo stack configurations‚ but instead of the stacks directory, you put them to subdirectories under the config-sets directory. The directory names become the names of the config sets, and you use them to refer to the config sets in the deployment configuration file.
You place your stack group and stack configuration files directly in the config set directory's root. Other standard Takomo directories such as the templates directory remains in the project's root.

Example

Here is an example with two config sets named networking and security.
1
.
2
├─ templates
3
├─ config-sets
4
│ ├─ networking
5
│ │ ├─ private
6
│ │ │ └─ tgw.yml
7
│ │ └─ public
8
│ │ └─ load-balancer.yml
9
│ └─ security
10
│ ├─ config.yml
11
│ └─ audit.yml
12
└─ deployment
13
└─ targets.yml
Copied!
The networking config set has two stack groups named private and public, and under them, there are stacks tgw.yml and load-balancer.yml.
The security config set has a stack group configuration (config.yml) and audit.yml stack.

Attaching config sets

You can attach config sets to deployment targets or deployment groups. Deployment groups and targets inherit config sets from the deployment group they belong to. They can add config sets of their own but can't remove the config sets they inherited.
You attach config sets to deployment groups and targets by providing single config set name or a list of config set names in their configSets property.

Example

Let's attach the two config sets (networking and security) from the previous example to some deployment groups and targets in our deployment configuration.
deployment/targets.yml
1
deploymentGroups:
2
all:
3
configSets: security
4
all/shared:
5
targets:
6
- name: infra
7
all/application:
8
configSets: networking
9
all/application/dev:
10
targets:
11
- name: dev-environment
12
- name: sandbox
13
all/application/prod:
14
targets:
15
- name: prod-environment
Copied!
We attached the security config set to the all deployment group. As all is the root deployment group, all of our targets inherit the security config set from it. We then attached the networking config set to the all/application group.
Last modified 5mo ago