terraform-provider-databricks
terraform-provider-databricks copied to clipboard
[ISSUE] Issue with `databricks_table` resource
Configuration
resource "databricks_table" "table" {
provider = databricks.workspace
name = "myview"
catalog_name = "team_platform"
schema_name = "test"
table_type = "VIEW"
view_definition = "create view team_platform.test.myview as select * from test.mytable"
data_source_format = "DELTA"
comment = "Managed by Terraform"
column {
name = "id"
position = 0
type_name = "INT"
type_text = "int"
type_json = "{\"name\":\"id\",\"type\":\"integer\",\"nullable\":true,\"metadata\":{}}"
}
}
Expected Behavior
<I tried to create a view using the documentation. It seems like there is an issue with the way we are creating views. Using the above simple TF code. I get an error trying to create a simple view.
Actual Behavior
<
-
When column block is missing: Terraform complains that there isn't any column block and atleast 1 is requried. As per the databricks documentation i do not see any requirement as such to specify columns when creating views.
-
When data_source_format is missing: I get an error "The argument "data_source_format" is required, but no definition was found". As per databricks documentation, this isn't required as well.
Steps to Reproduce
<
- Create a databricks view as "select * from tablename"
Terraform and provider versions
< Terraform v1.1.9 on linux_amd64
- provider registry.terraform.io/databricks/databricks v1.3.0
- provider registry.terraform.io/hashicorp/aws v3.75.2
- provider registry.terraform.io/hashicorp/template v2.2.0
- provider registry.terraform.io/hashicorp/time v0.8.0
Your version of Terraform is out of date! The latest version is 1.2.9. You can update by downloading from https://www.terraform.io/downloads.html