This question is about YTT. Is it possible to modify YAML list of items using the data from that items via overlays?
For example we have a template:
---
vlans:
- vlan-id: 10
- vlan-id: 20
- vlan-id: 30
some_other_configuration: #! some other config here
And using overlays we need to transform the template above into this:
---
vlans:
- vlan-id: 10
vlan-name: vlan10
- vlan-id: 20
vlan-name: vlan20
- vlan-id: 30
vlan-name: vlan30
some_other_configuration: #! some other config here
Yes. One can use an overlay within an overlay.
which can be read:
vlans:map item...https://carvel.dev/ytt/#gist:https://gist.github.com/pivotaljohn/33cbc52e808422e68c5ec1dc2ca38354
See also: