terraform-provider-databricks
terraform-provider-databricks copied to clipboard
[ISSUE] Issue with `databricks_sql_table` resource
Issue with databricks_sql_table
resource. The "warehouse_id" seems to be ignored, and Terraform is always creating a special cluster "terraform-sql-table" for CRUD operations.
Configuration
resource "databricks_sql_table" "this" {
provider = databricks.dataengineer
name = var.table
catalog_name = var.catalog
schema_name = var.schema
table_type = "EXTERNAL"
data_source_format = "DELTA"
storage_location = var.location
comment = var.comment
warehouse_id = "893a0ff662ac09de"
}
Expected Behavior
I expected terraform/databricks to use the specified warehouse to create the databricks_sql_table resources
Actual Behavior
terraform/databricks is always creating a cluster "terraform-sql-table" and ignoring the specified warehouse. Even the plan shows that terraform is generating a "cluster_id", even though, warehouse_id is explicitely specified
module.external_delta_table["bronze_gtfs_trips"].databricks_sql_table.this will be created
- resource "databricks_sql_table" "this" {
- catalog_name = "<my_catalog>"
- cluster_id = (known after apply)
- comment = "
" - data_source_format = "DELTA"
- id = (known after apply)
- name = "bronze_gtfs_trips"
- properties = (known after apply)
- schema_name = "<my_schema>"
- storage_location = "<s3_storage_location>"
- table_type = "EXTERNAL"
- warehouse_id = "893a0ff662ac09de" }
Steps to Reproduce
-
terraform apply
Terraform and provider versions
Terraform v1.6.5 on linux_amd64
- provider registry.terraform.io/databricks/databricks v1.30.0
- provider registry.terraform.io/hashicorp/aws v5.29.0
- provider registry.terraform.io/hashicorp/null v3.2.2
@mahmoud-masmoudi-dev could you share debug logs per the template so we could investigate further?
This is the same behavior for us. The warehouse_id or cluster_id field is just ignored and a default cluster "terraform-sql-table" is created always in a never-ending loop. Please upvote this issue and help get resolved.
Having the same issue here.