databricks / terraform-provider-databricks

Databricks Terraform Provider
https://registry.terraform.io/providers/databricks/databricks/latest
Other
424 stars 366 forks source link

[ISSUE] Issue with `databricks_schema` resource -- force_delete does not work #3659

Open EdSalisburyUnite opened 4 weeks ago

EdSalisburyUnite commented 4 weeks ago

Configuration

resource "databricks_schema" "patients_schema" {
  provider = databricks.workspace

  catalog_name = databricks_catalog.unite_catalog.id
  name         = "patients"
  comment      = "this schema is managed by terraform"

  force_destroy = true
}

Expected Behavior

Tables within the ed.patients schema should be deleted when performing terraform destroy.

Actual Behavior

Terraform aborts with the following error:

│ Error: cannot delete schema: Schema 'ed.patients' is not empty. The schema has 1 tables(s), 0 functions(s), 0 volumes(s)

Steps to Reproduce

terraform destroy

Terraform and provider versions

Terraform v1.8.3
on linux_arm64
+ provider registry.terraform.io/databricks/databricks v1.47.0
+ provider registry.terraform.io/hashicorp/archive v2.4.2
+ provider registry.terraform.io/hashicorp/aws v5.52.0
+ provider registry.terraform.io/hashicorp/local v2.5.1
+ provider registry.terraform.io/hashicorp/time v0.11.2

Is it a regression?

Unsure. I have tried on version 1.41.0 and 1.47.0.

Debug Output

Debug output gist

alexott commented 4 weeks ago

do you use vector search or online tables in that schema? If yes, then it's expected as of right now...

EdSalisburyUnite commented 4 days ago

We do not use vector search, but the tables that cause the issue are in a Unity Catalog -- Does that qualify as an "online table"? If so, are there plans to support force deletion?

istairbn commented 2 days ago

Any update? I've got a singular UC table in there I'd like to go as part of my testing environment