File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1
1
locals {
2
2
# This optional suffix is added to the end of resource names.
3
- suffix = length (var. suffix ) == 0 ? " " : " -${ var . suffix } "
4
-
5
- databricks_metastore_name = var. custom_databricks_metastore_name == null ? " meta-${ var . project } -${ var . env } -${ var . location } ${ local . suffix } " : var. custom_databricks_metastore_name
6
-
3
+ suffix = length (var. suffix ) == 0 ? " " : " -${ var . suffix } "
4
+ databricks_metastore_name = var. custom_databricks_metastore_name == null ? " meta-${ var . project } -${ var . env } -${ var . location } ${ local . suffix } " : var. custom_databricks_metastore_name
7
5
databricks_metastore_container_name = var. custom_databricks_metastore_container_name == null ? " meta-${ var . project } -${ var . env } " : var. custom_databricks_metastore_container_name
8
6
}
9
7
@@ -21,7 +19,6 @@ resource "azurerm_storage_data_lake_gen2_filesystem" "this" {
21
19
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"
22
20
}
23
21
}
24
-
25
22
}
26
23
27
24
resource "databricks_metastore" "this" {
@@ -33,7 +30,7 @@ resource "databricks_metastore" "this" {
33
30
}
34
31
35
32
resource "databricks_grants" "metastore" {
36
- count = var. create_metastore ? 1 : 0
33
+ count = length ( var. metastore_grants ) != 0 ? 1 : 0
37
34
38
35
metastore = length (var. external_metastore_id ) == 0 ? databricks_metastore. this [0 ]. id : var. external_metastore_id
39
36
dynamic "grant" {
You can’t perform that action at this time.
0 commit comments