Skip to content

Commit

Permalink
acl_auth_method: fix token name format default (#442)
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 55d3e92
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ IMPROVEMENTS:
* provider: update Go to 1.22.1 ([#439](https://github.com/hashicorp/terraform-provider-nomad/pull/439))
* resource/acl_auth_method: add support for `oidc_disable_userinfo` ([#429](https://github.com/hashicorp/terraform-provider-nomad/pull/429))

BUG FIXES:
* resource/nomad_acl_auth_method: fixed a bug that caused an unexpected plan difference when the `token_name_format` argument was not defined ([#442](https://github.com/hashicorp/terraform-provider-nomad/pull/442))

## 2.1.1 (January 30, 2024)

NOTES:
Expand Down
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 55d3e92

Please sign in to comment.