Skip to content

Commit

Permalink
Merge ef68143 into backport/b-remove-acl-token-update-type-default/co…
Browse files Browse the repository at this point in the history
…rrectly-tidy-bass
  • Loading branch information
hc-github-team-nomad-core committed Oct 10, 2023
2 parents 34bc4d3 + ef68143 commit 64941b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changelog/18689.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
cli: Fixed an unexpected behavior of the `nomad acl token update` command that could cause a management token to be downgraded to client on update
```
4 changes: 2 additions & 2 deletions command/acl_token_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Update Options:
Sets the human readable name for the ACL token.
-type="client"
Sets the type of token. Must be one of "client" (default), or "management".
Sets the type of token. Must be one of "client" or "management".
-global=false
Toggles the global mode of the token. Global tokens are replicated to all regions.
Expand Down Expand Up @@ -67,7 +67,7 @@ func (c *ACLTokenUpdateCommand) Run(args []string) int {
flags := c.Meta.FlagSet(c.Name(), FlagSetClient)
flags.Usage = func() { c.Ui.Output(c.Help()) }
flags.StringVar(&name, "name", "", "")
flags.StringVar(&tokenType, "type", "client", "")
flags.StringVar(&tokenType, "type", "", "")
flags.BoolVar(&global, "global", false, "")
flags.Var((funcVar)(func(s string) error {
policies = append(policies, s)
Expand Down
3 changes: 1 addition & 2 deletions website/content/docs/commands/acl/token/update.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ The `acl token update` command requires an existing token's accessor ID.

- `-name`: Sets the human readable name for the ACL token.

- `-type`: Sets the type of token. Must be one of "client" (default), or
"management".
- `-type`: Sets the type of token. Must be one of "client" or "management".

- `-global`: Toggles the global mode of the token. Global tokens are replicated
to all regions. Defaults false.
Expand Down

0 comments on commit 64941b1

Please sign in to comment.