Module
modules/aws-databricks-unity-catalog Link
Summary
The aws-databricks-unity-catalog module contains a databricks_default_namespace_setting resource in main.tf:
resource "databricks_default_namespace_setting" "this" {
namespace {
value = "main"
}
}
databricks_default_namespace_setting is a workspace-level resource — it must be applied via a provider pointed at a specific workspace host. However, the module is designed to be called with the account-level MWS provider pointed at https://accounts.cloud.databricks.com
module "databricks_metastore" {
source = "../../modules/aws-databricks-unity-catalog"
providers = {
databricks = databricks.mws
}
...
}
When Terraform attempts to create databricks_default_namespace_setting using the MWS provider, it targets accounts.cloud.databricks.com instead of a workspace host, resulting in an API error at apply time.
Suggested Fix
databricks_default_namespace_setting is removed from this module entirely
- A boolean variable (e.g. manage_default_namespace_setting = false) is added to allow callers to opt out, or
- The module accepts an optional workspace-level provider alias and conditionally creates the resource only when it is supplied
Environment
- Terraform: >= 1.10.0
- Databricks provider: ~> 1.0
- AWS provider: ~> 5.0