Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template lookup feature #208

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ozbillwang
Copy link

@ozbillwang ozbillwang commented Jun 14, 2018

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

  • Add lookup feature
  • unit test
  • update README

@alex-luminal
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants