You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-53Lines changed: 47 additions & 53 deletions
Original file line number
Diff line number
Diff line change
@@ -2,39 +2,28 @@
2
2
Terraform module for creation Azure Unity Catalog
3
3
4
4
## Usage
5
+
This module manages Unity Catalog resources like Catalogs, Schemas. In addition, it is possible to manage permissions within Metastore, Catalog and Schemas.
| <aname="input_suffix"></a> [suffix](#input\_suffix)| Optional suffix that would be added to the end of resources names. |`string`| " " | no |
105
-
| <aname="input_create_metastore"></a> [create\_metastore](#input\_create\_metastore)| Boolean flag for Unity Catalog Metastore current in this environment. One Metastore per region |`bool`| true | no |
106
-
| <aname="input_access_connector_id"></a> [access\_connector\_id](#input\_access\_connector\_id)| Databricks Access Connector Id that lets you to connect managed identities to an Azure Databricks account. Provides an ability to access Unity Catalog with assigned identity |`string`| " " | no |
107
-
| <aname="input_storage_account_id"></a> [storage\_account\_id](#input\_storage\_account\_id)| Storage Account Id where Unity Catalog Metastore would be provisioned |`string`| " " | no |
108
-
| <aname="input_storage_account_name"></a> [storage\_account\_name](#input\_storage\_account\_name)| Storage Account Name where Unity Catalog Metastore would be provisioned |`string`| " " | no |
109
-
| <aname="input_external_metastore_id"></a> [external\_metastore\_id](#input\_external\_metastore\_id)| Unity Catalog Metastore Id that is located in separate environment. Provide this value to associate Databricks Workspace with target Metastore |`string`| " " | no |
110
-
| <aname="input_catalog"></a> [catalog](#input\_catalog)| Map of objects which parameters refers to certain catalog and schema attributes | <pre> map(object({ <br> catalog_grants = optional(map(list(string))) <br> catalog_comment = optional(string) <br> catalog_properties = optional(map(string)) <br> schema_name = optional(list(string)) <br> schema_grants = optional(map(list(string))) <br> schema_comment = optional(string) <br> schema_properties = optional(map(string))<br>})) </pre> | {} | no |
111
-
| <aname="input_metastore_grants"></a> [metastore\_grants](#input\_metastore\_grants)| Permissions to give on metastore to group |`map(list(string))`| {} | no |
112
-
| <aname="input_custom_databricks_metastore_name"></a> [custom\_databricks\_metastore\_name](#input\_custom\_databricks\_metastore\_name)| The name to provide for your Databricks Metastore |`string`| null | no |
102
+
| <aname="input_env"></a> [env](#input\_project)| Environment name |`string`| n/a | yes |
103
+
| <aname="input_metastore_id"></a> [metastore\_id](#input\_metastore\_id)| Unity Catalog Metastore Id that is located in separate environment. Provide this value to associate Databricks Workspace with target Metastore|`string`| n/a | yes |
104
+
| <aname="input_metastore_grants"></a> [metastore\_grants](#input\_metastore\_grants)| Permissions to give on metastore to group | <pre>set(object({<br> principal = string<br> privileges = list(string)<br>}))</pre>|[]| no |
105
+
| <aname="input_catalog"></a> [catalog](#input\_catalog)| Map of catalog name and its parameters | <pre>map(object({<br> catalog_grants = optional(map(list(string)))<br> catalog_comment = optional(string)<br> catalog_properties = optional(map(string))<br> schema_name = optional(list(string))<br> schema_grants = optional(map(list(string)))<br> schema_comment = optional(string)<br> schema_properties = optional(map(string))<br>}))</pre>|{} | no |
| <aname="output_data_lake_gen2_file_system_id"></a> [data\_lake\_gen2\_file\_syste_id](#output\_data\_lake\_gen2\_file\_syste_id)| The ID of the Data Lake Gen2 File System. |
error_message="To create Metastore in a Region it is required to provide proper values for these variables: access_connector_id, storage_account_id, storage_account_name"
description="Optional suffix that would be added to the end of resources names."
19
-
default=""
20
-
}
21
-
22
-
# Unity Catalog variables
23
-
variable"create_metastore" {
24
-
type=bool
25
-
description="Boolean flag for Unity Catalog Metastore current in this environment. One Metastore per region"
26
-
default=false
27
-
}
28
-
29
-
variable"access_connector_id" {
30
-
type=string
31
-
description="Databricks Access Connector Id that lets you to connect managed identities to an Azure Databricks account. Provides an ability to access Unity Catalog with assigned identity"
32
-
default=""
33
-
}
34
-
35
-
variable"storage_account_id" {
36
-
type=string
37
-
description="Storage Account Id where Unity Catalog Metastore would be provisioned"
38
-
default=""
39
-
}
40
-
41
-
variable"storage_account_name" {
42
-
type=string
43
-
description="Storage Account Name where Unity Catalog Metastore would be provisioned"
44
-
default=""
45
-
}
46
-
47
-
variable"external_metastore_id" {
6
+
variable"metastore_id" {
48
7
type=string
49
8
description="Unity Catalog Metastore Id that is located in separate environment. Provide this value to associate Databricks Workspace with target Metastore"
error_message="UUID has to be either in nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn format or empty string"
11
+
condition=length(var.metastore_id) ==36
12
+
error_message="Create Metastore or connect to existing one in Init Layer using Private Endpoint. In case Unity Catalog is not required, remove 'databricks_catalog' variable from tfvars file."
54
13
}
55
14
}
56
15
16
+
# Metastore grants
17
+
variable"metastore_grants" {
18
+
type=set(object({
19
+
principal =string
20
+
privileges =list(string)
21
+
}))
22
+
description="Permissions to give on metastore to group"
23
+
default=[]
24
+
}
25
+
57
26
variable"catalog" {
58
27
type=map(object({
59
28
catalog_grants =optional(map(list(string)))
@@ -67,30 +36,3 @@ variable "catalog" {
67
36
description="Map of catalog name and its parameters"
68
37
default={}
69
38
}
70
-
71
-
# Metastore grants
72
-
variable"metastore_grants" {
73
-
type=map(list(string))
74
-
description="Permissions to give on metastore to group"
error_message="Metastore permission validation. The only possible values for permissions are: CREATE_CATALOG, CREATE_EXTERNAL_LOCATION, CREATE_SHARE, CREATE_RECIPIENT, CREATE_PROVIDER"
83
-
}
84
-
}
85
-
86
-
variable"custom_databricks_metastore_name" {
87
-
type=string
88
-
description="The name to provide for your Databricks Metastore"
0 commit comments