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

View File

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