0
0
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:
marvkos 2024-03-09 00:31:30 +01:00 committed by GitHub
parent 3b9739ab59
commit 461321cf5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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'`,
),
},

View File

@ -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'",
)),
},