Skip to content

Commit c206821

Browse files
committed
fixed useragent and moved to begining of config object creation
1 parent 98e9349 commit c206821

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

databricks/provider.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ func providerConfigure(d *schema.ResourceData, providerVersion string) (interfac
231231
// Call setup to configure retryable httpclient
232232
config.Setup()
233233

234+
//version information from go-releaser using -ldflags to tell the golang linker to send semver info
235+
config.UserAgent = fmt.Sprintf("databricks-tf-provider-%s", providerVersion)
236+
234237
if _, ok := d.GetOk("azure_auth"); !ok {
235238
if host, ok := d.GetOk("host"); ok {
236239
config.Host = host.(string)
@@ -255,9 +258,7 @@ func providerConfigure(d *schema.ResourceData, providerVersion string) (interfac
255258
return providerConfigureAzureClient(d, providerVersion, &config)
256259
}
257260

258-
//TODO: Bake the version of the provider using -ldflags to tell the golang linker to send
259-
//version information from go-releaser
260-
config.UserAgent = fmt.Sprintf("databricks-tf-provider-%s", providerVersion)
261+
261262
var dbClient service.DBApiClient
262263
dbClient.SetConfig(&config)
263264
return &dbClient, nil

0 commit comments

Comments
 (0)