func (c *DatabricksClient) Configure(attrsUsed ...string) error {
	c.configAttributesUsed = attrsUsed
	c.configureHTTPCLient()
	if c.DebugTruncateBytes == 0 {
		c.DebugTruncateBytes = DefaultTruncateBytes
	}
	azureEnvironment, err := c.getAzureEnvironment()
	if err != nil {
		return fmt.Errorf("cannot get azure environment: %w", err)
	}
	c.AzureEnvironment = &azureEnvironment
	return nil
}
Configure client to work, optionally specifying configuration attributes used
package common
import (
	"context"
	"crypto/tls"
	"encoding/base64"
	"fmt"
	"log"
	"net/http"
	"os"
	"reflect"
	"strings"
	"sync"
	"time"
	"golang.org/x/time/rate"
	"google.golang.org/api/option"
	"github.com/Azure/go-autorest/autorest"
	"github.com/Azure/go-autorest/autorest/azure"
	"github.com/hashicorp/go-retryablehttp"
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
	"github.com/mitchellh/go-homedir"
	"gopkg.in/ini.v1"
)
const (
	DefaultTruncateBytes      = 96
	DefaultRateLimitPerSecond = 15
	DefaultHTTPTimeoutSeconds = 60
)
type DatabricksClient struct {
	Host     string `name:"host" env:"DATABRICKS_HOST"`
	Token    string `name:"token" env:"DATABRICKS_TOKEN" auth:"token"`
	Username string `name:"username" env:"DATABRICKS_USERNAME" auth:"password"`
	Password string `name:"password" env:"DATABRICKS_PASSWORD" auth:"password"`
	AccountID string `name:"account_id" env:"DATABRICKS_ACCOUNT_ID"`
	Profile string `name:"profile" env:"DATABRICKS_CONFIG_PROFILE" auth:"config profile"`
	ConfigFile string `name:"config_file" env:"DATABRICKS_CONFIG_FILE"`
	GoogleServiceAccount string `name:"google_service_account" env:"DATABRICKS_GOOGLE_SERVICE_ACCOUNT" auth:"google"`
	AzureWorkspaceName string `name:"azure_workspace_name" env:"DATABRICKS_AZURE_WORKSPACE_NAME" auth:"azure"`
	AzureResourceGroup string `name:"azure_resource_group" env:"DATABRICKS_AZURE_RESOURCE_GROUP" auth:"azure"`
	AzureSubscriptionID string `name:"azure_subscription_id" env:"DATABRICKS_AZURE_SUBSCRIPTION_ID,ARM_SUBSCRIPTION_ID" auth:"azure"`
	AzureDatabricksResourceID string `name:"azure_workspace_resource_id" env:"DATABRICKS_AZURE_WORKSPACE_RESOURCE_ID,AZURE_DATABRICKS_WORKSPACE_RESOURCE_ID" auth:"azure"`
	AzurePATTokenDurationSeconds string `name:"azure_pat_token_duration_seconds"`
	AzureUsePATForCLI bool `name:"azure_use_pat_for_cli"`
	AzureUsePATForSPN bool `name:"azure_use_pat_for_spn"`
	AzureUseMSI bool `name:"azure_use_msi" env:"ARM_USE_MSI" auth:"azure"`
	AzureClientSecret  string `name:"azure_client_secret" env:"DATABRICKS_AZURE_CLIENT_SECRET,ARM_CLIENT_SECRET" auth:"azure"`
	AzureClientID      string `name:"azure_client_id" env:"DATABRICKS_AZURE_CLIENT_ID,ARM_CLIENT_ID" auth:"azure"`
	AzureTenantID      string `name:"azure_tenant_id" env:"DATABRICKS_AZURE_TENANT_ID,ARM_TENANT_ID" auth:"azure"`
	AzurermEnvironment string `name:"azure_environment" env:"ARM_ENVIRONMENT"`
	AzureEnvironment *azure.Environment
	InsecureSkipVerify bool `name:"skip_verify"`
	HTTPTimeoutSeconds int  `name:"http_timeout_seconds"`
	DebugTruncateBytes int `name:"debug_truncate_bytes" env:"DATABRICKS_DEBUG_TRUNCATE_BYTES"`
	DebugHeaders bool `name:"debug_headers" env:"DATABRICKS_DEBUG_HEADERS"`
	RateLimitPerSecond int `name:"rate_limit" env:"DATABRICKS_RATE_LIMIT"`
	azureAuthorizer autorest.Authorizer
	temporaryPat *tokenResponse
	googleAuthOptions []option.ClientOption
	authMutex sync.Mutex
	authVisitor func(r *http.Request) error
	rateLimiter *rate.Limiter
	Provider *schema.Provider
	httpClient *retryablehttp.Client
	configAttributesUsed []string
	commandFactory func(context.Context, *DatabricksClient) CommandExecutor
}
type ConfigAttribute struct {
	Name    string
	Kind    reflect.Kind
	EnvVars []string
	Auth    string
	num     int
}
func (ca *ConfigAttribute) Set(client *DatabricksClient, i interface{}) error {
	rv := reflect.ValueOf(client)
	field := rv.Elem().Field(ca.num)
	switch ca.Kind {
	case reflect.String:
		field.SetString(i.(string))
	case reflect.Bool:
		field.SetBool(i.(bool))
	case reflect.Int:
		field.SetInt(int64(i.(int)))
	default:
		return fmt.Errorf("cannot set %s of unknown type %s", ca.Name, reflectKind(ca.Kind))
	}
	return nil
}
func ClientAttributes() (attrs []ConfigAttribute) {
	t := reflect.TypeOf(DatabricksClient{})
	for i := 0; i < t.NumField(); i++ {
		field := t.Field(i)
		nameTag := field.Tag.Get("name")
		if nameTag == "" {
			continue
		}
		attr := ConfigAttribute{
			Name: nameTag,
			Auth: field.Tag.Get("auth"),
			Kind: field.Type.Kind(),
			num:  i,
		}
		envTag := field.Tag.Get("env")
		if envTag != "" {
			attr.EnvVars = strings.Split(envTag, ",")
		}
		attrs = append(attrs, attr)
	}
	return
}