I have configured Azure Databricks workspace and trying to integrate it with Gitlab to add repos using terraform.
I have added Gitlab personal access token to the databricks provider but seeingthe error “authentication is not configured for provider”.
│ Error: authentication is not configured for provider… Environment variables used: ARM_SUBSCRIPTION_ID, ARM_CLIENT_SECRET, ARM_CLIENT_ID, ARM_TENANT_ID. Please check https://registry.terraform.io/providers/databrickslabs/databricks/latest/docs#authentication for details
│
│ with databricks_repo.databricks-ws,
│ on main.tf line , in resource “databricks_repo” “databricks-ws”:
│ : resource “databricks_repo” “databricks-ws” {
I tried without adding the Gitlab access token, still getting the same error.
Is there a way to set up authentication to databricks for Gitlab Repo Integration?
##main.tf
resource “azurerm_databricks_workspace” “databricks-ws” {
name = “databricks-ws”
resource_group_name = azurerm_resource_group.databricks.name
location = azurerm_resource_group.databricks.location
sku = premium
managed_resource_group_name = “${local.resource_group_name}-managed”
custom_parameters {
public_subnet_name = data.azurerm_subnet.snet-host.name
public_subnet_network_security_group_association_id = data.azurerm_subnet.snet-host.id
private_subnet_name = data.azurerm_subnet.snet-container.name
private_subnet_network_security_group_association_id = data.azurerm_subnet.snet-container.id
virtual_network_id = data.azurerm_virtual_network.vnet.id
}
}
resource “databricks_repo” “databricks-ws” {
url = “https://gitlab.com/abc/xyz/notebooks.git”
git_provider = “gitLab”
branch = “test”
}
##provider.tf
provider “databricks” {
alias = “databricks_provider”
host = data.azurerm_databricks_workspace.databricks-ws.workspace_url
token = var.databricks_pat #gitlab personal access token
}
## data.tf
data “azurerm_databricks_workspace” “databricks-ws” {
name = “databricks-ws”
resource_group_name = local.resource_group_name
}
## Error Message
╷
│ Error: authentication is not configured for provider… Environment variables used: ARM_SUBSCRIPTION_ID, ARM_CLIENT_SECRET, ARM_CLIENT_ID, ARM_TENANT_ID. Please check https://registry.terraform.io/providers/databrickslabs/databricks/latest/docs#authentication for details
│
│ with databricks_repo.databricks-ws,
│ on main.tf line 164, in resource “databricks_repo” “databricks-ws”:
│ : resource “databricks_repo” “databricks-ws” {