sops
sops copied to clipboard
Support render template
the whole encrypted sops may contain a lot of secrets, but most of time only need piece of it, hope sops support some template render function, like
create user test login password '{{.pg.users.test.password}}';
sops secrets.yaml --output template=in.sql > out.sql
the out.sql should be
create user test login password 'xyz';
This can also used as inline template
sops secrets.yaml -o go-template="create user test login password '{{.pg.users.test.password}}';" > out.sql
The output should be the same
This feature would be appreciated.
Please note that there is already --extract
to get hold of single values (https://github.com/getsops/sops/blob/main/README.rst#45extract-a-sub-part-of-a-document-tree). This solves the use-cases shown in the original question. Obviously that doesn't allow more complex templating, but this is already useful for quite a few situations.