databricks / terraform-provider-databricks

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

[FEATURE] metastore_id as output from databricks_mws_workspaces resource #4126

Closed EMayneKT closed 1 month ago

EMayneKT commented 1 month ago

Use-cases

We have many terraform workspaces that use delta shares referencing metastores from multiple databricks accounts. When we deploy a new databricks workspace via terraform we need to be able to output the metastore id from the same apply.

At present, using the databricks_metastore data block in the same apply step as the databricks_mws_workspace resource creation does not work due to the databricks_mws_workspace not waiting for the metastore creation to complete before progressing with the rest of the apply (despite using the depends_on arg on the databricks_current_metastore resource)

Attempted Solutions

We are currently relying on a time_sleep resource to give the databricks_mws_workspace resource enough time to complete the creation of the metastore. This is far from ideal as there's no guarantee the metastore will actually be created in that time.

Proposal

Is it possible to output the metastore_id from the databricks_mws_workspaces terraform resource?

EMayneKT commented 1 month ago

Closing as raised in error