azureterraformdatabricksdatabricks-unity-catalogmetastore

Deploying databricks with metastore / unity catalog in terraform


I'm attempting to use terraform to deploy a databricks workspace using unity catalog on a completely databricks free empty environment.

In order to use unity catalog, I need to create a metadata store for the azure region.

In order to do this,whatever runs terraform needs to be a databricks account admin.

Is there any way to grant databricks account admin without a manual step.. You need account admin to grant account admin. Or do you have to have a entra administrator to log into the accounts portal withing databricks.

How is this handled usually as infrastructure as code?


Solution

  • Unity Catalog using Terraform in a fresh Databricks environment: before you can do anything else, you need to create a metastore. But there’s a catch — that step requires someone with account admin access in Databricks.

    That means before your IaC pipeline can take over, a real person has to log into the Databricks account console and manually set up the metastore. Then they have to link it to the right workspace. It’s just a one-time thing, but it’s required and can’t be fully automated (at least for now).

    Once that initial setup is done, though? You're golden. From that point forward, you can use Terraform to manage catalogs, schemas, permissions, and all the other Unity Catalog goodies without needing any more manual steps. Just make sure whoever does the initial setup knows what they’re doing — and that they don’t skip linking the metastore to the workspace.