terraform-provider-databricks icon indicating copy to clipboard operation
terraform-provider-databricks copied to clipboard

[ISSUE] Issue with provider - more than one authorization method configured: azure and oauth.

Open Jymitar opened this issue 1 year ago • 3 comments
trafficstars

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?

Jymitar avatar Aug 20 '24 07:08 Jymitar

+1

thereisnotime avatar Aug 20 '24 07:08 thereisnotime

Did you ever get this to work at all? Will try anything at this point that works.

TuckermanRav avatar Sep 26 '24 13:09 TuckermanRav

"Any updates on this issue? We have another customer experiencing it."

sim1501 avatar Oct 04 '24 02:10 sim1501

Any updates?

Zurina avatar Dec 28 '24 16:12 Zurina

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

kvanbrabant avatar Sep 02 '25 15:09 kvanbrabant