-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Product concerned
All
Feature description
For the moment, if we want to create a PAT token, and save it in an env variable, we need to so some tricky stuff:
$ PAT_TOKEN=$(ovhcloud iam user token create xxxxx --name xxxxxxx --description "PAT for xxxxx" -j | jq .details.token | tr -d '"')
2025/12/18 16:03:11 Final parameters:
{
"description": "PAT for xxxx",
"name": "xxxxx"
}
echo $PAT_TOKEN
<the-token>
In this command I've done several things:
- ask the output in json
- used jq to extract only the token field
- use tr to remove the double quotes
The goal is to have a kind of --raw flag or what you want, to help the user to have only the ID, the IP or whatever he or she has created through the CLI and use it easily in his/her CI/CD, pipelines, scripts... :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels