Skip to content

Commit

Permalink
Renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Jan 11, 2024
1 parent 4c2046d commit d05c254
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions infisical/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ func (p *infisicalProvider) Configure(ctx context.Context, req provider.Configur
serviceToken := os.Getenv("INFISICAL_SERVICE_TOKEN")

// Machine Identity
clientId := os.Getenv("INFISICAL_CLIENT_ID")
clientSecret := os.Getenv("INFISICAL_CLIENT_SECRET")
clientId := os.Getenv("INFISICAL_UNIVERSAL_AUTH_CLIENT_ID")
clientSecret := os.Getenv("INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET")

if !config.Host.IsNull() {
host = config.Host.ValueString()
Expand All @@ -124,10 +124,6 @@ func (p *infisicalProvider) Configure(ctx context.Context, req provider.Configur
host = "https://app.infisical.com"
}

if serviceToken == "" && clientId == "" && clientSecret == "" {
resp.Diagnostics.AddError("No authentication credentials provided", "You must define the service_token, or client_id and client_secret field of the provider.")
}

if resp.Diagnostics.HasError() {
return
}
Expand Down

0 comments on commit d05c254

Please sign in to comment.