databricks / terraform-provider-databricks

Databricks Terraform Provider
https://registry.terraform.io/providers/databricks/databricks/latest
Other
460 stars 394 forks source link

[ISSUE] Issue with `databricks` provider resource #1876

Closed amitca71 closed 1 year ago

amitca71 commented 1 year ago

Configuration

# Copy-paste your Terraform configuration here

terraform { required_providers { databricks = { source = "databricks/databricks" } } }

// initialize provider in "MWS" mode, to add users at account-level provider "databricks" { alias = "mws" host = "https://accounts.cloud.databricks.com" account_id = var.databricks_account_id username = var.databricks_username password = var.databricks_password }

Expected Behavior

terraform plan should succeed

Actual Behavior

Error: More than one authorization method configured: password and token

Steps to Reproduce

terraform plan

Terraform and provider versions

terraform=1.3.6 databricks=1.2.1

Debug Output

2022-12-27T13:00:31.114+0200 [DEBUG] provider.terraform-provider-databricks_v1.2.1: 200 OK { 2022-12-27T13:00:31.174+0200 [DEBUG] provider.terraform-provider-databricks_v1.2.1: 200 OK { 2022-12-27T13:00:31.176+0200 [DEBUG] provider.terraform-provider-databricks_v1.2.1: GET /api/2.1/unity-catalog/schemas/staging. default: timestamp=2022-12-27T13:00:31.175+0200 2022-12-27T13:00:31.227+0200 [DEBUG] provider.terraform-provider-databricks_v1.2.1: 200 OK { 2022-12-27T13:00:31.243+0200 [DEBUG] provider.terraform-provider-databricks_v1.2.1: GET /api/2.1/unity-catalog/schemas/staging. silver: timestamp=2022-12-27T13:00:31.243+0200 2022-12-27T13:00:31.309+0200 [DEBUG] provider.terraform-provider-databricks_v1.2.1: 200 OK { 2022-12-27T13:00:31.375+0200 [DEBUG] provider.terraform-provider-databricks_v1.2.1: 200 OK { 2022-12-27T13:00:31.422+0200 [DEBUG] provider.terraform-provider-databricks_v1.2.1: 200 OK { path=.terraform/providers/registry.terraform.io/databricks/databricks/1.2.1/darwin_amd64/terraform-provider-databricks_v1.2.1 pid=13349 with provider["registry.terraform.io/databricks/databricks"].mws, on providers.tf line 10, in provider "databricks": 10: provider "databricks" { {"ConsistentRead":true,"Key":{"LockID":{"S":"databricks-infrastructure-terraform/terragrunt/envs/production/ databricks_unity_catalog/terraform.tfstate"}},"ProjectionExpression":"LockID, Info","TableName":"terraform-locks"} 2022-12-27T13:00:32.083+0200 [DEBUG] [aws-sdk-go] {"Item":{"LockID":{"S":"databricks-infrastructure-terraform/terragrunt/envs/ production/databricks_unity_catalog/terraform.tfstate"},"Info":{"S":"{\"ID\":\"2cd77655-0325-f511-ecdd-5651b364e854\",\"Operation\": \"OperationTypePlan\",\"Info\":\"\",\"Who\":\"local\",\"Version\":\"1.3.6\",\"Created\":\"2022-12-27T11:00:11.443995Z\",\"Path\": \"databricks-infrastructure-terraform/terragrunt/envs/production/databricks_unity_catalog/terraform.tfstate\"}"}}} {"Key":{"LockID":{"S":"databricks-infrastructure-terraform/terragrunt/envs/production/databricks_unity_catalog/terraform.tfstate"}}, "TableName":"terraform-locks"} path=.terraform/providers/registry.terraform.io/databricks/databricks/1.2.1/darwin_amd64/terraform-provider-databricks_v1.2.1 pid=13350 time=2022-12-27T13:00:32+02:00 level=error msg=Terraform invocation failed in /Users/alog/.terragrunt-cache/ YcWN47fF6deLaRYwFs0W_t3i2-Q/Klfklx9pLuXIRXYY1RNzXVoJp2w/unity-catalog prefix=[/Users/ty_catalog]

Important Factoids

i execute using terragrunt

TakeshiMatsukura commented 1 year ago

Can you check if DATABRICKS_TOKEN env variable is set on your env?

amitca71 commented 1 year ago

yes, this was the issue. thanks a lot!!