Add support for more SDK config options (#587)

## Changes
Add support for more SDK config options
This commit is contained in:
Fabian Jakobs 2023-07-19 14:06:58 +02:00 committed by GitHub
parent acf292da37
commit adab9aa5d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 9 deletions

View File

@ -21,8 +21,13 @@ type Workspace struct {
//
// Generic attributes.
Host string `json:"host,omitempty"`
Profile string `json:"profile,omitempty"`
Host string `json:"host,omitempty"`
Profile string `json:"profile,omitempty"`
AuthType string `json:"auth_type,omitempty"`
MetadataServiceURL string `json:"metadata_service_url,omitempty"`
// OAuth specific attributes.
ClientID string `json:"client_id,omitempty"`
// Google specific attributes.
GoogleServiceAccount string `json:"google_service_account,omitempty"`
@ -60,8 +65,13 @@ type Workspace struct {
func (w *Workspace) Client() (*databricks.WorkspaceClient, error) {
cfg := databricks.Config{
// Generic
Host: w.Host,
Profile: w.Profile,
Host: w.Host,
Profile: w.Profile,
AuthType: w.AuthType,
MetadataServiceURL: w.MetadataServiceURL,
// OAuth
ClientID: w.ClientID,
// Google
GoogleServiceAccount: w.GoogleServiceAccount,

View File

@ -1788,8 +1788,11 @@
"artifact_path": {
"description": "The remote path to synchronize build artifacts to. This defaults to `${workspace.root}/artifacts`"
},
"auth_type": {
"description": "When multiple auth attributes are available in the environment, use the auth type specified by this argument"
},
"azure_client_id": {
"description": ""
"description": "Azure Client ID."
},
"azure_environment": {
"description": "Azure environment, one of (Public, UsGov, China, Germany)."
@ -1798,23 +1801,28 @@
"description": "Azure Login Application ID."
},
"azure_tenant_id": {
"description": ""
"description": "Azure Tenant ID."
},
"azure_use_msi": {
"description": ""
"description": "Whether to use Managed Service Identity (MSI) to authenticate to Azure Databricks."
},
"azure_workspace_resource_id": {
"description": "Azure Resource Manager ID for Azure Databricks workspace."
},
"client_id": {
"description": "OAath client ID for the Databricks workspace."
},
"file_path": {
"description": "The remote path to synchronize local files artifacts to. This defaults to `${workspace.root}/files`"
},
"google_service_account": {
"description": ""
},
"host": {
"description": "Host url of the workspace."
},
"metadata_service_url": {
"description": "The URL of the metadata service to use for authentication."
},
"profile": {
"description": "Connection profile to use. By default profiles are specified in ~/.databrickscfg."
},
@ -3591,4 +3599,4 @@
}
}
}
}
}