-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Allow formatted data when using -field and -format together. #3987
Conversation
As a special case, allows "data" to be passed in to get the entire data struct output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this. The output looks neat! LGTM!
Has a different output before and after the fix. |
I'm aware of that edge case but there's no real way to solve it. The only thing to do might be to see if the map has a data key and if so use that instead. Either way in one case or the other it won't work, it's just a matter of which will be more common. And of course in advanced usage like that people can just hit the API directly. |
Actually what you are seeing above is a different thing. When you use [email protected] what gets sent up to Vault is the string output of the file, json-encoded. So when you use What you can/should do there is simply not specify |
Also note that if you send @payload.json directly as the value in the CLI, since you're not assigning it as a value for the key |
@jefferai Yep. Had tested the sending of @payload.json directly and had verified that the behavior was proper. I also had tested the behavior which the reporting user was using as a workaround. I agree that the behavior we notice is right (since we are encoding the value as a string). So, all good. |
As a special case, allows "data" to be passed in to get the entire data
struct output.