terraform-provider-databricks
terraform-provider-databricks copied to clipboard
[ISSUE] Issue with provider - more than one authorization method configured: azure and oauth.
Hi there, I am using Databricks with AWS and I also have azurem backend in the same project.
I am trying to use both Databricks with service principles and azure backend but looks like they clash. The problem is that I use envs to pass the configuration like this and that looks like to be the main issue.
ARM_CLIENT_ID=xxxxxxxxxxxx - for azurem backend ARM_CLIENT_SECRET=xxxxxxxxxxxxxx - for azurem backend ARM_SUBSCRIPTION_ID=xxxxxxxxxxxxxxxxxxx - for azurem backend ARM_TENANT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - for azurem backend DATABRICKS_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxx - for databricks DATABRICKS_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxx - for databricks
Configuration
this is my provider configuration as per documentation I have tried using variables
provider "databricks" { alias = "mws" account_id = var.databricks_account_id host = "https://accounts.cloud.databricks.com" cient_id = var.DATABRICKS_CLIENT_ID client_secret = var.DATABRICKS_CLIENT_SECRET auth_type = "oauth-m2m" }
I have also tried directly from env
provider "databricks" { alias = "mws" account_id = var.databricks_account_id host = "https://accounts.cloud.databricks.com" auth_type = "oauth-m2m" }
nothing works. It tries to use both azure and oauth regardless of what you set.
Expected Behavior
When you set auth_type to oauth it should ignore azure environments
Actual Behavior
It tries to use both auth types - more than one authorization method configured: azure and oauth.
Steps to Reproduce
Have both databricks client id and secret and ARM environments set
Terraform and provider versions
Latest 1.50.0
Is it a regression?
Debug Output
Important Factoids
Would you like to implement a fix?
+1
Did you ever get this to work at all? Will try anything at this point that works.
"Any updates on this issue? We have another customer experiencing it."
Any updates?
You could try setting DATABRICKS_AUTH_TYPE (as an env var) or auth-type as a provider attribute. See https://registry.terraform.io/providers/databricks/databricks/latest/docs#auth_type-1