This module provisions all resources and permissions required to integrate your Databricks account with Vantage.
At a high level, the module will:
- Create a Service Principal at the account level
- Create OAuth credentials for the Service Principal
- Create a SQL Warehouse
- Assign the Service Principal permissions to use the SQL Warehouse
- Assign the Service Principal permissions to use the
system
tablesbilling
,access
, andcompute
After applying this module, the outputs (e.g., client ID, secret, SQL warehouse ID) will be used to configure the Databricks integration in the Vantage UI.
You will need to define two Databricks providers in your Terraform configuration, one for the account level and one for the workspace level.
# Workspace-level provider (used for SQL Warehouse and permissions)
provider "databricks" {
alias = "workspace"
host = "your_workspace_url"
// authenticate to your Databricks workspace...
}
# Account-level provider (used for Service Principal creation)
provider "databricks" {
alias = "account"
host = "https://accounts.cloud.databricks.com"
account_id = "your_account_id"
// authenticate to your Databricks account...
}
module "databricks_billing" {
providers = {
databricks.workspace = databricks.workspace
databricks.account = databricks.account
}
source = "path_to_your_module"
}