Skip to content

Commit

Permalink
acl_auth_method: fix token name format default
Browse files Browse the repository at this point in the history
Set the token name default value used by Nomad to avoid unnecessary plan
changes when the attribute is not defined.
  • Loading branch information
lgfa29 committed Mar 12, 2024
1 parent 1620741 commit 2a6b90f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions nomad/resource_acl_auth_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func resourceACLAuthMethod() *schema.Resource {
Description: "Defines the token format for the authenticated users. This can be lightly templated using HIL '${foo}' syntax.",
Optional: true,
Type: schema.TypeString,
Default: "${auth_method_type}-${auth_method_name}",
},
"default": {
Description: "Defines whether this ACL Auth Method is to be set as default.",
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/acl_auth_method.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ The following arguments are supported:
- `max_token_ttl` `(string: <required>)` - Defines the maximum life of a token
created by this method and is specified as a time duration such as "15h".

- `token_name_format` `(string: <optional>)` - Defines the token name format for the
generated tokens This can be lightly templated using HIL '${foo}' syntax.
Defaults to `${auth_method_type}-${auth_method_name}`.
- `token_name_format` `(string: "${auth_method_type}-${auth_method_name}")` -
Defines the token name format for the generated tokens This can be lightly
templated using HIL '${foo}' syntax.

- `default` `(bool: false)` - Defines whether this ACL Auth Method is to be set
as default.
Expand Down

0 comments on commit 2a6b90f

Please sign in to comment.