mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-08-22 19:38:35 +00:00
fix: allow LDAP realm API tokens (#1101)
Signed-off-by: Marvin Kosmider <marvin.kosmider@technikum-wien.at>
This commit is contained in:
parent
3b9739ab59
commit
461321cf5e
@ -95,7 +95,7 @@ func (p *proxmoxProvider) Schema(_ context.Context, _ provider.SchemaRequest, re
|
||||
Sensitive: true,
|
||||
Validators: []validator.String{
|
||||
stringvalidator.RegexMatches(
|
||||
regexp.MustCompile(`^\S+@\w+!\S+=([a-zA-Z0-9-]+)$`),
|
||||
regexp.MustCompile(`^\S+@\S+!\S+=([a-zA-Z0-9-]+)$`),
|
||||
`must be a valid API token, e.g. 'USER@REALM!TOKENID=UUID'`,
|
||||
),
|
||||
},
|
||||
|
@ -85,7 +85,7 @@ func createSchema() map[string]*schema.Schema {
|
||||
Sensitive: true,
|
||||
Description: "The API token for the Proxmox VE API.",
|
||||
ValidateDiagFunc: validation.ToDiagFunc(validation.StringMatch(
|
||||
regexp.MustCompile(`^\S+@\w+!\S+=([a-zA-Z0-9-]+)$`),
|
||||
regexp.MustCompile(`^\S+@\S+!\S+=([a-zA-Z0-9-]+)$`),
|
||||
"Must be a valid API token, e.g. 'USER@REALM!TOKENID=UUID'",
|
||||
)),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user