Reputation: 172
EDIT: the solution was to replace "https://accounts.azuredatabricks.net"
by the workspace URL.
Terraform is unable to create Databricks items when authenticating with a service principal. I get Error: cannot create schema: invalid Databricks Workspace configuration
, even though my provider is setup like this:
provider "databricks" {
host = "https://accounts.azuredatabricks.net"
account_id = module.global_settings.databricks_account_id
azure_client_id = module.global_settings.databricks_client_id
azure_client_secret = data.azurerm_key_vault_secret.sp_db.value
azure_tenant_id = module.global_settings.azure_tenant_id
}
The client_id
is the service principal's Application (client) ID. What am I missing here?
I have also tried doing it without a service principal, so like this:
provider "databricks" {
host = data.azurerm_databricks_workspace.workspace_data.workspace_url
azure_workspace_resource_id = data.azurerm_databricks_workspace.workspace_data.workspace_id
azure_use_msi = true
}
but then I get failed during request visitor: inner token: token request: Get "http://XXX.XXX.XXX.XXX/metadata/identity/oauth2/token?api-version=2018-02-01&resource=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX": context deadline exceeded
Upvotes: 1
Views: 40