gomplate
Somehow searching the repo works better for me than reading documentation.
Install
sudo curl -o /usr/local/bin/gomplate -sSL \
https://github.com/hairyhenderson/gomplate/releases/download/v3.11.3/gomplate_linux-amd64
sudo chmod 755 /usr/local/bin/gomplate
Simple use with a (JSON) file data source
> echo 'foo=' | \
gomplate -d secrets=/home/alex/Projects/pass-secret/app/secrets.json
foo=bar
Use with AWS Secrets Manager
Provided you stored the secret like this:
```sh
aws secretsmanager create-secret \
--name pass-secret \
--description "Secrets for pass-secret repo" \
--secret-string file:///home/alex/Projects/pass-secret/app/secrets.json
You can retrieve it:
echo 'foo=' | \
gomplate -d 'secrets=aws+sm:pass-secret?type=application/json'