05-12-2025 01:59 AM - edited 05-12-2025 02:03 AM
Hi!
I'm using Terraform(TF) to manage the Databricks resources.
I would like to rename the Unity catalog using TF, but I could not. (similar issues have been reported for this:
- https://github.com/databricks/terraform-provider-databricks/issues?q=is%3Aissue%20state%3Aopen%20ren...
After investigating this issue, I found that the Terraform databricks_catalog resource is using the catalog name as its ID.
https://github.com/databricks/terraform-provider-databricks/blob/1982317e41702b4210e54666a5681cfd2b1...
This causes several serious problems, including:
It's impossible to rename a catalog using Terraform.
If I rename a catalog created by Terraform via the UI, Terraform will recognize it as deleted and recreate it based on theTerraform configuration. As a result, two catalogs will exist.
I looked into why Terraform is using the name as the ID, and it turns out that the REST API does not include the actual catalog ID in its response.
https://docs.databricks.com/api/workspace/catalogs/get
Could you please modify the REST API to include the catalog ID in its response?
This issue is causing us significant trouble.
Thank you!
05-13-2025 07:00 AM
databricks_catalog
resource is implemented. Specifically, the catalog name is being used as the resource's ID, which is a direct consequence of limitations in the Databricks REST API response that does not include an actual catalog ID. Because of this:resource_catalog.go
confirms the use of the name as the ID:
Id: catalog.Name,
.05-13-2025 07:00 AM
databricks_catalog
resource is implemented. Specifically, the catalog name is being used as the resource's ID, which is a direct consequence of limitations in the Databricks REST API response that does not include an actual catalog ID. Because of this:resource_catalog.go
confirms the use of the name as the ID:
Id: catalog.Name,
.05-13-2025 05:45 PM
@BigRoux Thank you for your quick and thorough response! I'm glad to know that my assumption was correct.
Would it be possible for you to escalate this issue to the backend team that is developing the catalog REST API?
05-14-2025 06:41 AM
I will pass your request along; however, there is nothing I can do to escalate the issue. I can only make the request. Cheers, Lou.
Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!
Sign Up Now