Open JonasDev1 opened 1 year ago
resource "databricks_catalog" "sandbox" { metastore_id = local.metastore_id name = var.catalog_name storage_root = local.s3_location owner = local.group_name comment = "this catalog is managed by terraform" depends_on = [ databricks_external_location.sandbox ] }
Since version 1.19.0 it's possible to rename a existing Unity catalog in terraform without a replacement. This should work
The terraform plan shows the correct action, but the apply is not possible:
Plan:
# databricks_catalog.sandbox will be updated in-place ~ resource "databricks_catalog" "sandbox" { id = "sandbox_xxx_new" ~ name = "sandbox_xxx_new" -> "sandbox_xxx" # (6 unchanged attributes hidden) }
Apply:
databricks_catalog.sandbox: Modifying... [id=sandbox_xxx_new] ╷ │ Error: cannot update catalog: Catalog 'sandbox_xxx' does not exist. │ │ with databricks_catalog.sandbox, │ on unity.tf line 9, in resource "databricks_catalog" "sandbox": │ 9: resource "databricks_catalog" "sandbox" { │ ╵
Provider version 1.19.0
@JonasDev1 thank you for flagging this - there is an underlying issue with the go sdk where it does not allow a rename operation
Configuration
Expected Behavior
Since version 1.19.0 it's possible to rename a existing Unity catalog in terraform without a replacement. This should work
Actual Behavior
The terraform plan shows the correct action, but the apply is not possible:
Plan:
Apply:
Terraform and provider versions
Provider version 1.19.0