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?
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 thedatabricks_mws_workspace
resource creation does not work due to thedatabricks_mws_workspace
not waiting for the metastore creation to complete before progressing with the rest of the apply (despite using thedepends_on
arg on thedatabricks_current_metastore
resource)Attempted Solutions
We are currently relying on a
time_sleep
resource to give thedatabricks_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 thedatabricks_mws_workspaces
terraform resource?