databricks / terraform-provider-databricks

Databricks Terraform Provider
https://registry.terraform.io/providers/databricks/databricks/latest
Other
456 stars 393 forks source link

[ISSUE] Issue with `databricks_volume ` resource #4225

Open gszecsenyi opened 1 week ago

gszecsenyi commented 1 week ago

A played a bit with terraform yesterday evening, and I have an issue, what I cannot solve:

Configuration

Terraform databricks provider version is 1.51.0

Expected Behavior

I would like to create a MANAGED volume type

Actual Behavior

In the plan there is an EXTERNAL volume_type

Steps to Reproduce

this is the configuration:

databricks_workloads_volumes = [
    {
      storage_directory_name = "leaf"
      schema_ref             = "schema_ref"
      volume_type            = "MANAGED"
    }
    ]
this is the output:
+ resource "databricks_volume" "volumes" {
      + catalog_name     = "catalog_name"
      + comment          = "volume connected to abfss://yyyy@xxx.dfs.core.windows.net/leaf"
      + id               = (known after apply)
      + name             = "leaf"
      + owner            = (known after apply)
      + schema_name      = "schema_name"
      + storage_location = "abfss://yyyy@xxxd.dfs.core.windows.net/leaf"
      + volume_path      = (known after apply)
      + volume_type      = "EXTERNAL"
    }

Terraform and provider versions

1.51.0

alexott commented 1 week ago

If you specify storage_location then the volume is external, not managed

gszecsenyi commented 1 week ago

but I did not specified storage location as you see in my request:

databricks_workloads_volumes = [ { storage_directory_name = "leaf" schema_ref = "schema_ref" volume_type = "MANAGED" } ]

alexott commented 1 week ago

this is incomplete code - show the code where databricks_volume resource is defined