Skip to content

Commit

Permalink
Add support for more SDK config options
Browse files Browse the repository at this point in the history
  • Loading branch information
fjakobs committed Jul 19, 2023
1 parent acf292d commit 3840856
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
20 changes: 16 additions & 4 deletions bundle/config/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ 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"`
ConfigFile string `json:"config_file,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"`
Expand Down Expand Up @@ -60,8 +66,14 @@ 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,
ConfigFile: w.ConfigFile,
MetadataServiceURL: w.MetadataServiceURL,

// OAuth
ClientID: w.ClientID,

// Google
GoogleServiceAccount: w.GoogleServiceAccount,
Expand Down
21 changes: 16 additions & 5 deletions bundle/schema/docs/bundle_descriptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)."
Expand All @@ -1798,23 +1801,31 @@
"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."
},
"config_file": {
"description": "Path to the Databricks CLI configuration file. This defaults to `~/.databrickscfg`"
},
"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."
},
Expand Down Expand Up @@ -3591,4 +3602,4 @@
}
}
}
}
}

0 comments on commit 3840856

Please sign in to comment.