An Apache Spark-based analytics platform optimized for Azure.
Hi Gokul,
Per the docs, a force delete is supposed to remove it. The delete-workspace article says the workspace catalog is kept after a normal delete, and that the portal checkbox to delete the managed resource group, az databricks workspace delete --force-deletion, or Remove-AzDatabricksWorkspace -ForceDeletion also remove the workspace catalog and its data.
What you're describing matches a Databricks KB article: after the workspace storage is permanently deleted, the catalog entry can be left behind in the metastore with no workspace attached. From other workspaces these usually show up greyed out in Catalog Explorer, and you can't change their owner.
You can clean them up with the Databricks CLI, authenticated to any workspace that is still attached to the same metastore:
databricks catalogs delete <workspace-catalog-name> --force
The catalog is named after the workspace by default. Run it as a metastore admin. The workspace catalog is owned by that workspace's admins group, which is a workspace-local group, so once the workspace is gone a metastore admin is the practical way to remove it. --force is needed because the catalog isn't empty (it still has the default schema).
To stop them piling up, you can add that command as a step right after terraform destroy in your pipeline, using an identity that is a metastore admin. Since force delete is documented to remove the catalog and your manual portal and CLI tests show the same result, I'd also open a support case with that repro.
References:
- https://learn.microsoft.com/en-us/azure/databricks/admin/workspace/delete-workspace
- https://learn.microsoft.com/en-us/azure/databricks/dev-tools/cli/reference/catalogs-commands
- https://kb.databricks.com/en_US/unity-catalog/grayed-out-catalogs-appearing-in-a-deleted-unity-catalog-registered-workspace