Skip to content

Commit 5915568

Browse files
authored
Merge pull request #3 from data-platform-hq/feat/metastore-container-custom-name
fix: metastore container custom name
2 parents 047841e + 1e2f557 commit 5915568

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
locals {
22
# This optional suffix is added to the end of resource names.
3-
suffix = length(var.suffix) == 0 ? "" : "-${var.suffix}"
3+
suffix = length(var.suffix) == 0 ? "" : "-${var.suffix}"
4+
45
databricks_metastore_name = var.custom_databricks_metastore_name == null ? "meta-${var.project}-${var.env}-${var.location}${local.suffix}" : var.custom_databricks_metastore_name
6+
7+
databricks_metastore_container_name = var.custom_databricks_metastore_container_name == null ? "meta-${var.project}-${var.env}" : var.custom_databricks_metastore_container_name
58
}
69

710
resource "azurerm_storage_data_lake_gen2_filesystem" "this" {
811
count = var.create_metastore ? 1 : 0
912

10-
name = "meta-${var.project}-${var.env}"
13+
name = local.databricks_metastore_container_name
1114
storage_account_id = var.storage_account_id
1215

1316
lifecycle {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,9 @@ variable "custom_databricks_metastore_name" {
8888
description = "The name to provide for your Databricks Metastore"
8989
default = null
9090
}
91+
92+
variable "custom_databricks_metastore_container_name" {
93+
type = string
94+
description = "The name to provide for your Databricks Metastore Container"
95+
default = null
96+
}

0 commit comments

Comments
 (0)