I'm trying to create a databricks metastore:
resource "databricks_metastore" "this" {
name = "primary"
storage_root = format("abfss://%s@%s.dfs.core.windows.net/",
azurerm_storage_container.unity_catalog.name,
azurerm_storage_account.unity_catalog.name
)
force_destroy = true
}
However, I'm getting the following error:
Error: cannot create metastore: Only account admin can create metastores.
Looking through the Azure docs, I see the following:
Account admins can manage your Databricks account-level configurations, including creation of workspaces, Unity Catalog metastores, billing, and cloud resources. Account admins can add users to the account and assign them admin roles. They can also give users access to workspaces, as long as those workspaces use identity federation.
In my terraform project, I've logged in using az login
and my provider declaration is like this:
provider "databricks" {
azure_workspace_resource_id = data.azurerm_databricks_workspace.this.id
host = local.databricks_workspace_host
}
According to these docs I have verified that my account (i.e. the one I used with az login
) has both roles:
Any idea why I'm still getting this error?
You need to be admin in Databricks Account Console to be able to create a Metastore.