-
Notifications
You must be signed in to change notification settings - Fork 44
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
Adding --value
flag to credhub get
#3
Comments
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/145284463 The labels on this github issue will be updated when the story is started. |
Now that I think about it, would be nice to be able to retrieve nested values as well, e.g. |
Hey Lyle - Thanks for the feature request. Can you summarize your use case where you are consuming CLI value programmatically? It feels consistent to allow property accessors like |
@pivotal-danjahner For example, CI scripts that need the CF admin password in order to run a test suite or programmatically push an app. Also developer workflows for targeting a given CF environment with a one-liner rather than copy-pasting creds in the terminal. For example:
I'd be happy with the first line as a start, sound like getting nested values like in the second line is more complicated. Does the |
We've recently finished a story that restricts credential names to disallow dots as part of the name. After a migration period, we should be able to implement property accessors using the |
ping
That would be much easier, if the cli could provide just the value with a flag. |
How do you feel about what Lyle said above?
I'm not sure if that's a feature you entirely rejected or just didn't prioritize. |
ping @crawsible |
Any updates on feelings about this by any chance? |
@ljfranklin @voelzmo @aegershman we're going to prioritize a story for adding the |
This is done! It is available in the latest version of the CLI. :) |
@ankeesler I recently tried to use EDIT: I just now realized this switch is named |
To make the CLI more usable in automated scripts, a flag that pulls out just the value of a credential would be super helpful. A current workaround would be setting
--output-json
and usingjq
, but a simple flag feels nicer.For example:
Plain
get
:With flag:
If this seems reasonable but y'all don't have time, I'd be willing to throw a PR your way.
The text was updated successfully, but these errors were encountered: