Created
July 12, 2021 13:54
-
-
Save schmurfy/75e7c6f5d7bd0a367ab3f7a7fc435895 to your computer and use it in GitHub Desktop.
ytt key/value mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@ load("@ytt:data", "data") | |
#@ load("@ytt:struct", "struct") | |
env: | |
#@ for k in struct.decode(data.values.my_map): | |
- name: #@ k | |
value: #@ data.values.my_map[k] | |
#@ end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@data/values-schema | |
--- | |
my_map: | |
key1: value1 | |
key2: value2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment