Closed apamildner closed 1 month ago
resource "databricks_sql_table" "my_table" { name = "foo" catalog_name = "bar" schema_name ="baz" table_type = "EXTERNAL" storage_location = "abfss://some-location" data_source_format = "JSON" options = { recursiveFileLookup = true multiLine = true } }
The options should be applied and not trigger a change on the next plan
We get a perpetual diff like this:
~ resource "databricks_sql_table" "my_table" { ~ effective_properties = { + "option.multiLine" = "true" + "option.recursiveFileLookup" = "true" # (2 unchanged elements hidden) }
terraform apply
Terraform version: 1.8.5 Provider version: 1.52
1.8.5
1.52
Yes, I think this is en edge case that wasn't covered by the great PR that solved a previous similar issue: https://github.com/databricks/terraform-provider-databricks/pull/3925 I would assume that since the options in this case end up like this in the state:
options
"effective_properties": { "spark.sql.dataSourceOptions.multiLine": "true", "spark.sql.dataSourceOptions.recursiveFileLookup": "true" },
And not
"effective_properties": { "options.multiLine": "true", "options.recursiveFileLookup": "true" },
we will get that diff. I think we need to handle the edge case where the options are of type spark.sql.dataSourceOptions.
spark.sql.dataSourceOptions
Configuration
Expected Behavior
The options should be applied and not trigger a change on the next plan
Actual Behavior
We get a perpetual diff like this:
Steps to Reproduce
terraform apply
terraform apply
againTerraform and provider versions
Terraform version:
1.8.5
Provider version:1.52
Is it a regression?
Yes, I think this is en edge case that wasn't covered by the great PR that solved a previous similar issue: https://github.com/databricks/terraform-provider-databricks/pull/3925 I would assume that since the
options
in this case end up like this in the state:And not
we will get that diff. I think we need to handle the edge case where the options are of type
spark.sql.dataSourceOptions
.