From 2a6b90ffe141b864c0dc475bd277940861320030 Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Tue, 12 Mar 2024 15:24:24 -0400 Subject: [PATCH] acl_auth_method: fix token name format default Set the token name default value used by Nomad to avoid unnecessary plan changes when the attribute is not defined. --- nomad/resource_acl_auth_method.go | 1 + website/docs/r/acl_auth_method.html.markdown | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nomad/resource_acl_auth_method.go b/nomad/resource_acl_auth_method.go index 19cdefe0..d45caece 100644 --- a/nomad/resource_acl_auth_method.go +++ b/nomad/resource_acl_auth_method.go @@ -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.", diff --git a/website/docs/r/acl_auth_method.html.markdown b/website/docs/r/acl_auth_method.html.markdown index e4150027..36c3a9c1 100644 --- a/website/docs/r/acl_auth_method.html.markdown +++ b/website/docs/r/acl_auth_method.html.markdown @@ -55,9 +55,9 @@ The following arguments are supported: - `max_token_ttl` `(string: )` - 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: )` - 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.