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

decrypt should emit json for the entire item #50

Closed
pburkholder opened this issue Sep 20, 2013 · 2 comments · Fixed by #64
Closed

decrypt should emit json for the entire item #50

pburkholder opened this issue Sep 20, 2013 · 2 comments · Fixed by #64

Comments

@pburkholder
Copy link

I can update an existing vault item from json that contains multiple values, e.g.: zs-api.json:

{
  "id": "zs-api",
  "aws_access_key": "TRYNUMBERTWO",
  "aws_secret_key": "herewegoonceagainmyfriend"
}

then

    knife encrypt update pdbtest zs-api --mode client --json zs-api.json

It seems I also should be able to emit json for bulk edits and re-uploading, e.g: the following should work:

    knife decrypt pdbtest zs-api --mode client -F json > new.json

so I can bulk edit and update the vault more consistently.

@gmanfunky
Copy link

Or even without the proposed "-F json"
Simple change would be to have https://github.com/Nordstrom/chef-vault/blob/master/lib/chef/knife/Decrypt.rb work without needing to provide VALUES.

@moserke
Copy link
Contributor

moserke commented Sep 23, 2013

I like both. :-)

-F for changing the format seems reasonable and follows the same feel of the data bag commands where you can pass in -F (summary, text, json, yaml, or pp). This feels natural and will update it, unless you have a branch with it in it that you want to PR to me.

Making VALUES optional also seems natural to me and follows the knife data bag show [bag] [item] paradigm. If you supply VALUES you can filter the things returned, if you don't then you get the whole vault item returned. Again, will make that change unless you have a branch with it in it to PR to me.

Thanks guys, good suggestions!

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 a pull request may close this issue.

3 participants