From 461321cf5e15dfd1b89a506ecf6a410e24bc8c5d Mon Sep 17 00:00:00 2001 From: marvkos <87067609+marvkos@users.noreply.github.com> Date: Sat, 9 Mar 2024 00:31:30 +0100 Subject: [PATCH] fix: allow LDAP realm API tokens (#1101) Signed-off-by: Marvin Kosmider --- fwprovider/provider.go | 2 +- proxmoxtf/provider/schema.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fwprovider/provider.go b/fwprovider/provider.go index a50171bb..fd3a9abc 100644 --- a/fwprovider/provider.go +++ b/fwprovider/provider.go @@ -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'`, ), }, diff --git a/proxmoxtf/provider/schema.go b/proxmoxtf/provider/schema.go index b6608a81..23f93f4d 100644 --- a/proxmoxtf/provider/schema.go +++ b/proxmoxtf/provider/schema.go @@ -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'", )), },