terraform-provider-databricks icon indicating copy to clipboard operation
terraform-provider-databricks copied to clipboard

[FEATURE] Don't destroy workspace binding completely if it's the last binding for an object

Open alexott opened this issue 1 year ago • 3 comments

When destroying the workspace binding we may need to check if it's the last binding for a current UC object, and if it's then don't destroy it until UC object has isolation mode changed to OPEN.

Implementing this will prevent errors that UC object isn't available in the current workspace, like this:

databricks_workspace_binding.service_cred: Destruction complete after 2s
databricks_credential.credential: Destroying... [id=aott-db-service-isolated]
╷
│ Error: cannot delete credential: Credential 'aott-db-service-isolated' is not accessible in current workspace
│
│
╵

alexott avatar Dec 10 '24 05:12 alexott

I'm having this problem also. Any updates?

devlucasc avatar Dec 27 '24 14:12 devlucasc

Any word on this? - Have a customer that has hit this one as well.

jaokeeffe-db avatar Sep 15 '25 07:09 jaokeeffe-db

Hi,

Any updates on this? We have the same problem when destroying the external locations with isolation mode ISOLATED with its workspace binding.

databricks_workspace_binding.uc_external_locations_bindings["cz_comm_telemetry-common"]: Destroying... [id=7468699070917090|external_location|loc-landa-uc-sbx-cz-comm-telemetry]
databricks_workspace_binding.uc_external_locations_bindings["cz_comm_telemetry-common"]: Destruction complete after 2s
databricks_grants.external_location_grants["cz_comm_telemetry"]: Destroying... [id=external_location/loc-landa-uc-sbx-cz-comm-telemetry]

╷
│ Error: cannot delete grants: External Location 'loc-landa-uc-sbx-cz-comm-telemetry' is not accessible in current workspace
│ 
│ 
╵

leireroman12 avatar Nov 17 '25 11:11 leireroman12