@@ -10,11 +10,19 @@ This module provides an ability for Databricks Workspace configuration and Resou
10
10
5 . Users for Standard SKU Worspaces
11
11
12
12
``` hcl
13
+ # Prerequisite resources
13
14
data "azurerm_databricks_workspace" "example" {
14
15
name = "example-workspace"
15
16
resource_group_name = "example-rg"
16
17
}
17
18
19
+ # Databricks Provider configuration
20
+ provider "databricks" {
21
+ alias = "main"
22
+ host = data.azurerm_databricks_workspace.example.workspace_url
23
+ azure_workspace_resource_id = data.azurerm_databricks_workspace.example.id
24
+ }
25
+
18
26
# Key Vault which contains Service Principal credentials (App ID and Secret) for mounting ADLS Gen 2
19
27
data "azurerm_key_vault" "example" {
20
28
name = "example-key-vault"
@@ -26,12 +34,7 @@ data "azurerm_storage_account" "example" {
26
34
resource_group_name = "example-rg"
27
35
}
28
36
29
- provider "databricks" {
30
- alias = "main"
31
- host = data.azurerm_databricks_workspace.example.workspace_url
32
- azure_workspace_resource_id = data.azurerm_databricks_workspace.example.id
33
- }
34
-
37
+ # Databricks Runtime module usage example
35
38
module "databricks_runtime_core" {
36
39
source = "data-platform-hq/databricks-runtime/databricks"
37
40
@@ -42,15 +45,15 @@ module "databricks_runtime_core" {
42
45
users = ["user1", "user2"]
43
46
44
47
# Parameters of Service principal used for ADLS mount
45
- # Imports App ID and Secret of Service Principal
48
+ # Imports App ID and Secret of Service Principal from target Key Vault
46
49
key_vault_id = data.azurerm_key_vault.example.id
47
50
sp_client_id_secret_name = "sp-client-id"
48
51
sp_key_secret_name = "sp-key"
49
52
tenant_id_secret_name = "infra-arm-tenant-id"
50
53
51
54
# Default cluster parameters
52
55
custom_default_cluster_name = "databricks_example_custer"
53
- cluster_nodes_availability = "SPOT_AZURE" # requires Regional Spot quotas increase
56
+ cluster_nodes_availability = "SPOT_AZURE" # it required to increase Regional Spot quotas
54
57
cluster_log_conf_destination = "dbfs:/cluster-logs"
55
58
custom_cluster_policies = [{
56
59
name = "custom_policy_1",
@@ -68,7 +71,7 @@ module "databricks_runtime_core" {
68
71
# Additional Secret Scope
69
72
secret_scope = [{
70
73
scope_name = "extra-scope"
71
- acl = null # Only group names are allowed. If left empty then only Worspace admins could access these keys
74
+ acl = null # Only group names are allowed. If left empty then only Workspace admins could access these keys
72
75
secrets = [
73
76
{ key = "secret-name", string_value = "secret-value"}
74
77
]
0 commit comments