Fix object storage credential custom endpoint and resource manager regex commnet (#178)

This commit is contained in:
Vicente Pinto 2023-12-22 16:03:18 +00:00 committed by GitHub
parent c7effac5c7
commit cfaf8f2605
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -70,10 +70,10 @@ func (r *credentialResource) Configure(ctx context.Context, req resource.Configu
var apiClient *objectstorage.APIClient
var err error
if providerData.PostgreSQLCustomEndpoint != "" {
if providerData.ObjectStorageCustomEndpoint != "" {
apiClient, err = objectstorage.NewAPIClient(
config.WithCustomAuth(providerData.RoundTripper),
config.WithEndpoint(providerData.PostgreSQLCustomEndpoint),
config.WithEndpoint(providerData.ObjectStorageCustomEndpoint),
)
} else {
apiClient, err = objectstorage.NewAPIClient(

View file

@ -171,7 +171,7 @@ func (r *projectResource) Schema(_ context.Context, _ resource.SchemaRequest, re
),
mapvalidator.ValueStringsAre(
stringvalidator.RegexMatches(
regexp.MustCompile(`[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`),
regexp.MustCompile(`^$|[A-ZÄÜÖa-zäüöß0-9_-]{1,64}`),
"must match expression"),
),
},