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

cli/namespace: add detailed flag to namespace list #20243

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

jasonodonnell
Copy link
Contributor

This enhances the namespace list command to include a detailed flag which will output additional data such as namespace IDs. This is very useful because without this you would either need to use curl or do a vault namespace lookup for every namespace you wanted the ID for in a loop. This lets you get all the information in one command:

$ vault namespace list -detailed
Keys    custom_metadata    id       path
----    ---------------    --       ----
bar/    map[]              yva5e    bar/
foo/    map[]              iZULg    foo/

$ vault namespace list -detailed -format=json
{
  "bar/": {
    "custom_metadata": {},
    "id": "yva5e",
    "path": "bar/"
  },
  "foo/": {
    "custom_metadata": {},
    "id": "iZULg",
    "path": "foo/"
  }
}

@jasonodonnell jasonodonnell merged commit 98786d9 into main Apr 19, 2023
@jasonodonnell jasonodonnell deleted the namespace-list-id branch April 19, 2023 13:31
jasonodonnell added a commit that referenced this pull request Apr 19, 2023
* cli/namespace: add detailed flag to namespace list

* changelog
jasonodonnell added a commit that referenced this pull request Apr 19, 2023
* cli/namespace: add detailed flag to namespace list

* changelog
jasonodonnell added a commit that referenced this pull request Apr 19, 2023
* cli/namespace: add detailed flag to namespace list

* changelog

Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
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.

3 participants