databricks / terraform-provider-databricks

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

[FEATURE] Add account-level API support for UC resources #2179

Closed nkvuong closed 1 year ago

nkvuong commented 1 year ago

Account-level APIs are available for databricks_metastore, databricks_metastore_assignment and databricks_storage_credential.

Need to add support to use these resources with provider that are defined against account-level url

No parameters change required, except for an additional region parameter for databricks_metastore

Unity Catalog guides should also be updated to reflect this

john-auld commented 1 year ago

Try creating two workspaces with Unity Catalog.

You will find that there are awkward resource ordering and dependency problems, which would not exist if the following resources used the Account API instead of the Workspace API.

  1. databricks_metastore
  2. databricks_metastore_assignment
  3. databricks_catalog

There may be other problem with other resources that use the Workspace API, but creating two workspaces requires the following resource order.

  1. workspace a, using the mws provider.
  2. metastore, depends on workspace a
  3. unity catalog, depends on metastore
  4. workspace assignment, depends on metastore
  5. workspace b, depends on metastore and indirectly on workspace a.

In the Databricks E2 UI, the resources can be created manually, but the process is problematic in Terraform

Deleting workspace a would destroy the whole stack.

alexandremoyrand commented 1 year ago

hello @nkvuong

This issue along with the PR https://github.com/databricks/terraform-provider-databricks/pull/2182 are very important for the deployment of our stack. When do you think it will be released? is there any blocking point ?

Thanks

vsluc commented 1 year ago

Much important feature for our databricks adoption. Could we please prioritize this feature?

peterutama commented 1 year ago

I am in agreement, we are developing our deployment stack, and account level support for Unity catalog (#2182 and this PR) will be needed.

mgyucht commented 1 year ago

This is finally merged and released in the 1.24.0 release of the Terraform provider for Databricks.