fugue / credstash

A little utility for managing credentials in the cloud
Apache License 2.0
2.06k stars 214 forks source link

Add template lookup feature #208

Open ozbillwang opened 6 years ago

ozbillwang commented 6 years ago

Add lookup feature to replace any keys with format "{{ secrect_key_name }}"

Usage:

$ ./credstash template -h
usage: credstash.py template [-h] file

positional arguments:
  file        name of template file.

optional arguments:
  -h, --help  show this help message and exit

$ cat test.json

{
  "foo": "{{ foo.key }}"
}

$ ./credstash template test.json

If all secret keys are ready, all secret keys will be replaced with secrets directly and updated in file.

$ cat test.json
{
  "foo": "bar"
}

Let me know if you are fine for the feature, then I will add unittest step

alex-luminal commented 6 years ago

Great idea! If you want to push a test and a README update, I can get this merged in