@@ -10,35 +10,42 @@ data "azurerm_databricks_workspace" "example" {
10
10
resource_group_name = "example-rg"
11
11
}
12
12
13
+ # Key Vault which contains Service Principal credentials (App ID and Secret) for mounting ADLS Gen 2
13
14
data "azurerm_key_vault" "example" {
14
- name = "examplekeyvault "
15
+ name = "example-key-vault "
15
16
resource_group_name = "example-rg"
16
17
}
17
18
18
19
data "azurerm_storage_account" "example" {
19
- name = "example-storage "
20
+ name = "examplestorage "
20
21
resource_group_name = "example-rg"
21
22
}
22
23
24
+ provider "databricks" {
25
+ alias = "main"
26
+ host = data.azurerm_databricks_workspace.example.workspace_url
27
+ azure_workspace_resource_id = data.azurerm_databricks_workspace.example.id
28
+ }
29
+
23
30
module "databricks_runtime_core" {
24
31
source = "data-platform-hq/databricks-runtime/databricks"
25
- version = "1.4.0"
26
32
27
- sku = "standard"
28
- workspace_id = azurerm_databricks_workspace.example.workspace_id
29
- users = ["user1", "user2"]
33
+ sku = "premium"
34
+ workspace_id = data.azurerm_databricks_workspace.example.workspace_id
35
+
36
+ # This parameter only used when workspace wku equals 'standard'
37
+ users = ["user1", "user2"]
30
38
31
39
# Parameters of Service principal used for ADLS mount
40
+ # Imports App ID and Secret of Service Principal
32
41
key_vault_id = data.azurerm_key_vault.example.id
33
42
sp_client_id_secret_name = "sp-client-id"
34
43
sp_key_secret_name = "sp-key"
35
44
tenant_id_secret_name = "infra-arm-tenant-id"
36
45
37
46
# Default cluster parameters
38
47
custom_default_cluster_name = "databricks_example_custer"
39
- cluster_nodes_availability = "SPOT_AZURE"
40
-
41
-
48
+ cluster_nodes_availability = "SPOT_AZURE" # requires Regional Spot quotas increase
42
49
cluster_log_conf_destination = "dbfs:/cluster-logs"
43
50
custom_cluster_policies = [{
44
51
name = "custom_policy_1",
@@ -55,9 +62,11 @@ module "databricks_runtime_core" {
55
62
56
63
# Additional Secret Scope
57
64
secret_scope = [{
58
- scope_name = null
59
- acl = null
60
- secrets = null
65
+ scope_name = "extra-scope"
66
+ acl = null # Only group names are allowed. If left empty then only Worspace admins could access these keys
67
+ secrets = [
68
+ { key = "secret-name", string_value = "secret-value"}
69
+ ]
61
70
}]
62
71
63
72
mountpoints = {
0 commit comments