Add a new envsubst operator to replace environment variables in strings (#1082)

This commit is contained in:
Samuel Cormier-Iijima
2022-01-25 19:33:30 +11:00
committed by GitHub
parent 9b1a7bf451
commit 8195ff8b9b
8 changed files with 152 additions and 0 deletions
@@ -0,0 +1,10 @@
# Envsubst
This operator is used to replace environment variables in strings using [envsubst](https://github.com/a8m/envsubst).
To replace environment variables across all values in a document, this can be used with the recursive descent operator
as follows:
```bash
yq eval '(.. | select(tag == "!!str")) |= envsubst' file.yaml
```