@@ -9,15 +9,13 @@ The main idea behind this module is to deploy resources for Databricks Workspace
9
9
Here we provide some examples of how to provision it with a different options.
10
10
11
11
### In example below, these features of given module would be covered:
12
- 1 . Workspace admins assignment, custom Workspace group creation, group assignments, group entitlements
13
- 2 . Clusters (i.e., for Unity Catalog and Shared Autoscaling)
14
- 3 . Workspace IP Access list creation
15
- 4 . ADLS Gen2 Mount
16
- 5 . Create Secret Scope and assign permissions to custom groups
17
- 6 . SQL Endpoint creation and configuration
18
- 7 . Create Cluster policy
19
- 8 . Create an Azure Key Vault-backed secret scope
20
- 9 . Connect to already existing Unity Catalog Metastore
12
+ 1 . Clusters (i.e., for Unity Catalog and Shared Autoscaling)
13
+ 2 . Workspace IP Access list creation
14
+ 3 . ADLS Gen2 Mount
15
+ 4 . Create Secret Scope and assign permissions to custom groups
16
+ 5 . SQL Endpoint creation and configuration
17
+ 6 . Create Cluster policy
18
+ 7 . Create an Azure Key Vault-backed secret scope
21
19
22
20
``` hcl
23
21
# Prerequisite resources
@@ -56,25 +54,10 @@ module "databricks_runtime_premium" {
56
54
sp_key_secret_name = "sp-key" # secret's name that stores Service Principal Secret Key
57
55
tenant_id_secret_name = "infra-arm-tenant-id" # secret's name that stores tenant id value
58
56
59
- # 1.1 Workspace admins
60
- workspace_admins = {
61
- user = ["user1@example.com"]
62
- service_principal = ["example-app-id"]
63
- }
64
-
65
- # 1.2 Custom Workspace group with assignments.
66
- # In addition, provides an ability to create group and entitlements.
67
- iam = [{
68
- group_name = "DEVELOPERS"
69
- permissions = ["ADMIN"]
70
- entitlements = [
71
- "allow_instance_pool_create",
72
- "allow_cluster_create",
73
- "databricks_sql_access"
74
- ]
75
- }]
57
+ # Cloud provider
58
+ cloud_name = cloud-name # cloud provider (e.g., aws, azure)
76
59
77
- # 2 . Databricks clusters configuration, and assign permission to a custom group on clusters.
60
+ # 1 . Databricks clusters configuration, and assign permission to a custom group on clusters.
78
61
databricks_cluster_configs = [ {
79
62
cluster_name = "Unity Catalog"
80
63
data_security_mode = "USER_ISOLATION"
@@ -90,33 +73,33 @@ module "databricks_runtime_premium" {
90
73
permissions = [{group_name = "DEVELOPERS", permission_level = "CAN_MANAGE"}]
91
74
}]
92
75
93
- # 3 . Workspace could be accessed only from these IP Addresses:
76
+ # 2 . Workspace could be accessed only from these IP Addresses:
94
77
ip_rules = {
95
78
"ip_range_1" = "10.128.0.0/16",
96
79
"ip_range_2" = "10.33.0.0/16",
97
80
}
98
81
99
- # 4 . ADLS Gen2 Mount
82
+ # 3 . ADLS Gen2 Mount
100
83
mountpoints = {
101
84
storage_account_name = data.azurerm_storage_account.example.name
102
85
container_name = "example_container"
103
86
}
104
87
105
- # 5 . Create Secret Scope and assign permissions to custom groups
88
+ # 4 . Create Secret Scope and assign permissions to custom groups
106
89
secret_scope = [{
107
90
scope_name = "extra-scope"
108
91
acl = [{ principal = "DEVELOPERS", permission = "READ" }] # Only custom workspace group names are allowed. If left empty then only Workspace admins could access these keys
109
92
secrets = [{ key = "secret-name", string_value = "secret-value"}]
110
93
}]
111
94
112
- # 6 . SQL Warehouse Endpoint
95
+ # 5 . SQL Warehouse Endpoint
113
96
databricks_sql_endpoint = [{
114
97
name = "default"
115
98
enable_serverless_compute = true
116
99
permissions = [{ group_name = "DEVELOPERS", permission_level = "CAN_USE" },]
117
100
}]
118
101
119
- # 7 . Databricks cluster policies
102
+ # 6 . Databricks cluster policies
120
103
custom_cluster_policies = [{
121
104
name = "custom_policy_1",
122
105
can_use = "DEVELOPERS", # custom workspace group name, that is allowed to use this policy
@@ -129,7 +112,7 @@ module "databricks_runtime_premium" {
129
112
}
130
113
}]
131
114
132
- # 8 . Azure Key Vault-backed secret scope
115
+ # 7 . Azure Key Vault-backed secret scope
133
116
key_vault_secret_scope = [{
134
117
name = "external"
135
118
key_vault_id = data.azurerm_key_vault.example.id
@@ -141,27 +124,14 @@ module "databricks_runtime_premium" {
141
124
}
142
125
}
143
126
144
- # 9 Assignment already existing Unity Catalog Metastore
145
- module "metastore_assignment" {
146
- source = "data-platform-hq/metastore-assignment/databricks"
147
- version = "1.0.0"
148
-
149
- workspace_id = data.azurerm_databricks_workspace.example.workspace_id
150
- metastore_id = "<uuid-of-metastore>"
151
-
152
- providers = {
153
- databricks = databricks.workspace
154
- }
155
- }
156
-
157
127
```
158
128
159
129
<!-- BEGIN_TF_DOCS -->
160
130
## Requirements
161
131
162
132
| Name | Version |
163
133
| ------| ---------|
164
- | <a name =" requirement_terraform " ></a > [ terraform] ( #requirement\_ terraform ) | >= 1.0 |
134
+ | <a name =" requirement_terraform " ></a > [ terraform] ( #requirement\_ terraform ) | >=1.3 |
165
135
| <a name =" requirement_databricks " ></a > [ databricks] ( #requirement\_ databricks ) | ~ >1.0 |
166
136
167
137
## Providers
0 commit comments