Add validate func for auth method type key (#178)
* Add validate func for auth key Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com> * Add oidc Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com>
This commit is contained in:
1 parent
214bc5224f
commit
93d925fcfd
1 file changed
+5
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/hashicorp/boundary/api/authmethods"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
|
||||
)
|
||||
|
||||
func resourceAuthMethod() *schema.Resource {
|
||||
@@ -50,6 +51,10 @@ func resourceAuthMethod() *schema.Resource {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
ValidateFunc: validation.StringInSlice([]string{
|
||||
authmethodTypeOidc,
|
||||
authmethodTypePassword,
|
||||
}, false),
|
||||
},
|
||||
authmethodMinLoginNameLengthKey: {
|
||||
Description: "The minimum login name length.",
|
||||
|
||||
Reference in new issue
Block a user