-
Notifications
You must be signed in to change notification settings - Fork 488
Open
Description
Configuration
resource "databricks_catalog" "sandbox" {
name = "sandbox"
isolation_mode = "ISOLATED"
}
resource "databricks_workspace_binding" "sandbox" {
securable_name = databricks_catalog.sandbox.name
workspace_id = databricks_mws_workspaces.current.workspace_id
}Expected Behavior
I have some ideas:
- When ISOLATED, do not bind automatically, let the user declare the bind resource explicit
- Or, when workspace binding resource is declared together with the main resource, make it fail to avoid replacing the current bind as well and update the documentation to explain that is not necessary to set workspace binding to the current workspace when isolation_mode is ISOLATED.
Actual Behavior
When creating catalog with isolation mode as ISOLATED, this resource automatically will bind the catalog to the current workspace. If set a databricks_workspace_binding resource pointing to the current workspace, the binding will be replaced by this resource and the state will be controlled by terraform. When destroy is executed, the binding resource will be removed before the catalog removal. In this case, the catalog will not be accessible in the current workspace anymore and then the destroy will fail.
Steps to Reproduce
terraform applyterraform destroy
Terraform and provider versions
Terraform 1.7.5
Provider 1.97.0
Is it a regression?
No, it isn't
Debug Output
Important Factoids
Would you like to implement a fix?
giulioottantotto
Metadata
Metadata
Assignees
Labels
No labels