Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for more SDK config options #587

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions bundle/config/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
fjakobs marked this conversation as resolved.
Show resolved Hide resolved

// Google specific attributes.
GoogleServiceAccount string `json:"google_service_account,omitempty"`
Expand Down Expand Up @@ -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,
Expand Down
18 changes: 13 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,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."
},
Expand Down Expand Up @@ -3591,4 +3599,4 @@
}
}
}
}
}