Support env from vault
This commit is contained in:
parent
c403e74073
commit
4fa4e4452f
|
@ -14,7 +14,13 @@
|
|||
template {
|
||||
data = <<_EOT
|
||||
[[- range $k, $v := $env ]]
|
||||
[[- if or (isKind "string" $v) (isKind "number" $v) ]]
|
||||
[[ $k ]]=[[ $v ]]
|
||||
[[- else if isKind "map" $v ]]
|
||||
[[- if and (has $v "source") (eq $v.source "vault") ]]
|
||||
[[ $k ]]={{ with secret "[[ if has $v "path" ]][[ $v.path ]][[ else ]][[ $.vault.kv.path ]][[ end ]]" }}{{ [[ $v.key ]] }}{{ end }}
|
||||
[[- end ]]
|
||||
[[- end ]]
|
||||
[[- end ]]
|
||||
_EOT
|
||||
destination = "secrets/.env"
|
||||
|
|
Loading…
Reference in New Issue
Block a user