cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Administration & Architecture
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Problem with provisioning lakehouse via Terraform

Masoomeh
New Contributor II

I am trying to provision the lakehouse on Azure using the Terraform template provided here: https://github.com/databricks/terraform-databricks-examples/tree/main/examples/adb-lakehouse. I have started from scratch and have only added a resource group, a storage account and a container in Azure before I run the Terraform code. As per documentation, I have also modified the content of "terraform.tfvars". After running the Terraform code, I get the following errors:

 

ā•·
ā”‚ Error: cannot create catalog: No metastore assigned for the current workspace.
ā”‚
ā”‚   with module.adb-lakehouse-data-assets.databricks_catalog.bronze-catalog,
ā”‚   on ..\..\modules\adb-lakehouse-uc\uc-data-assets\uc-data-assets.tf line 1, in resource "databricks_catalog" "bronze-catalog":
ā”‚    1: resource "databricks_catalog" "bronze-catalog" {
ā”‚
ā•µ
ā•·
ā”‚ Error: cannot create external location: No metastore assigned for the current workspace.
ā”‚
ā”‚   with module.adb-lakehouse-data-assets.databricks_external_location.landing-external-location,
ā”‚   on ..\..\modules\adb-lakehouse-uc\uc-data-assets\uc-data-assets.tf line 26, in resource "databricks_external_location" "landing-external-location":
ā”‚   26: resource "databricks_external_location" "landing-external-location" {
ā”‚
ā•µ
ā•·
ā”‚ Error: cannot create metastore data access: No metastore assigned for the current workspace.
ā”‚
ā”‚   with module.adb-lakehouse-uc-metastore.databricks_metastore_data_access.access-connector-data-access,
ā”‚   on ..\..\modules\adb-lakehouse-uc\uc-metastore\uc-metastore.tf line 11, in resource "databricks_metastore_data_access" "access-connector-data-access":
ā”‚   11: resource "databricks_metastore_data_access" "access-connector-data-access" {
ā”‚

 

I have checked in the portal and see that the metastore is created. The access connector is also created and is assigned the required role (Storage Blob Data Contributor). The workspace is also connected to the UC metastore. But what I don't find is the managed identity under "Storage Credentials" in Unity Catalog. I appreciate any input on this.

1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @Masoomeh, Iā€™m sorry to hear that youā€™re facing issues while provisioning the lakehouse on Azure using the Terraform template provided by Databricks. Based on the error messages youā€™ve shared, it seems that the metastore is not assigned to the current workspace.

 

I suggest you check if the metastore is assigned to the correct workspace. You can also try assigning the metastore to the workspace again and then running the Terraform code.

 

Regarding the managed identity under ā€œStorage Credentialsā€, Iā€™m not sure what youā€™re referring to. Could you please provide more information about this?

Also, I found a helpful link that provides detailed instructions on how to provision a lakehouse platform using Terraform on Azure. You can refer to this link to ensure that you have followed all the necessary steps correctly.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.