Skip to content

Commit

Permalink
Merge branch 'main' into jaylevin-patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
jaylevin authored Oct 2, 2024
2 parents 05b8024 + e91c4ab commit 3837aa9
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions internal/clients/confluent.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,12 @@ func TerraformSetupBuilder(version, providerSource, providerVersion string, sche
}

// Set credentials in Terraform provider configuration.
ps.Configuration = map[string]any{}
if cloudAPIKey, ok := creds[cloudAPIKey]; ok {
ps.Configuration[cloudAPIKey] = creds[cloudAPIKey]
}
if cloudAPISecret, ok := creds[cloudAPISecret]; ok {
ps.Configuration[cloudAPISecret] = creds[cloudAPISecret]
}
if kafkaAPIKey, ok := creds[kafkaAPIKey]; ok {
ps.Configuration[kafkaAPIKey] = creds[kafkaAPIKey]
}
if kafkaAPISecret, ok := creds[kafkaAPISecret]; ok {
ps.Configuration[kafkaAPISecret] = creds[kafkaAPISecret]
}
if kafkaRESTEndpoint, ok := creds[kafkaRESTEndpoint]; ok {
ps.Configuration[kafkaRESTEndpoint] = creds[kafkaRESTEndpoint]
ps.Configuration = map[string]any{
cloudAPIKey: creds[cloudAPIKey],
cloudAPISecret: creds[cloudAPISecret],
kafkaAPIKey: creds[kafkaAPIKey],
kafkaAPISecret: creds[kafkaAPISecret],
kafkaRESTEndpoint: creds[kafkaRESTEndpoint],
}
return ps, nil
}
Expand Down

0 comments on commit 3837aa9

Please sign in to comment.