terraform-provider-databricks
terraform-provider-databricks copied to clipboard
[FEATURE] Identity column specification on `databricks_sql_table`
Use-cases
Be able to define Identity column on a table the databricks_sql_table
needs some means to define identity columns. After the release of provider version 1.40 it seems impossible to create a table with an Identity column (Issue #3490)
The Identity column options documented here needs to be possible in Terraform too.
Attempted Solutions
Until provider version 1.40 this was possible
resource "databricks_sql_table" "table_foo" {
name = "foo"
catalog_name = databricks_catalog.main.name
schema_name = databricks_schema.main.name
table_type = "MANAGED"
data_source_format = "DELTA"
column {
name = "bar"
type = "bigint GENERATED BY DEFAULT AS IDENTITY"
nullable = "false"
}
After that provider version above fails with errors on plan. As #3490
Proposal
Something similar to this could be possible
resource "databricks_sql_table" "table_foo" {
name = "foo"
catalog_name = databricks_catalog.main.name
schema_name = databricks_schema.main.name
table_type = "MANAGED"
data_source_format = "DELTA"
column {
name = "bar"
type = "bigint "
nullable = "false"
identity = "default" // possible values FALSE (default) & ALWAYS
}
References
I would also appreciate that feature
Resolved in #4035