From adb7ad0fbe3ff343a0f363b525cf34133d464c0e Mon Sep 17 00:00:00 2001 From: Rajat Bajaj Date: Mon, 18 Nov 2024 21:13:38 +0530 Subject: [PATCH] Update validation logic for env vars --- internal/config/config.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index 372f19ce5..29bc15f41 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -62,17 +62,6 @@ func ConfigureProvider(terraformVersion *string) schema.ConfigureContextFunc { audience := data.Get("audience").(string) debug := data.Get("debug").(bool) - if apiToken == "" && (clientID == "" || clientSecret == "" || domain == "") { - return nil, diag.Diagnostics{ - { - Severity: diag.Error, - Summary: "Missing environment variables", - Detail: fmt.Sprintf("Either AUTH0_API_TOKEN or AUTH0_DOMAIN:AUTH0_CLIENT_ID:AUTH0_CLIENT_SECRET must be configured. " + - "Ref: https://registry.terraform.io/providers/auth0/auth0/latest/docs"), - }, - } - } - apiClient, err := management.New(domain, authenticationOption(clientID, clientSecret, apiToken, audience), management.WithDebug(debug),