cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Error: cannot create mws storage configurations: default auth: cannot configure default credentials.

thains
New Contributor III

I’ve run into an error that I can't figure out how to debug. We're trying to use terraform through a service account. I don’t know if it’s a permissions issue on Databricks, in our account, or in AWS, but it seems that something is being blocked somewhere. We’re getting a pretty generic failure.

Here's our configuration

// initialize provider in "MWS" mode to provision new workspace
provider "databricks" {
  alias    = "mws"
  host     = "https://accounts.cloud.databricks.com"
  client_id = "318477c1-e16d-402e-8ba5-46653a2c98e1"
  client_secret = "<omitted for security>"
  account_id = "67533872-e1d4-4932-b025-0642043fb05c"
}

When I execute the terraform plan, we get this error:

Error: cannot create mws storage configurations: default auth: cannot configure default credentials. Config: host=https://accounts.cloud.databricks.com

 I've run a DEBUG mode for the terraform, too. These seem to be the relevant lines:

2023-12-08T11:00:04.939-0500 [DEBUG] provider.terraform-provider-databricks_v1.29.0: Databricks CLI version <0.100.0 detected: @caller=/home/runner/work/terraform-provider-databricks/terraform-provider-databricks/logger/logger.go:33 tf_resource_type=databricks_mws_networks @module=databricks tf_provider_addr=registry.terraform.io/databricks/databricks tf_req_id=c37844bd-3b5f-2c84-6515-f93c480fd27e tf_rpc=ApplyResourceChange timestamp=2023-12-08T11:00:04.939-0500

2023-12-08T11:00:04.939-0500 [DEBUG] provider.terraform-provider-databricks_v1.29.0: failed during request visitor: default auth: cannot configure default credentials. Config: host=https://accounts.cloud.databricks.com: tf_resource_type=databricks_mws_networks @caller=/home/runner/work/terraform-provider-databricks/terraform-provider-databricks/logger/logger.go:33 @module=databricks tf_provider_addr=registry.terraform.io/databricks/databricks tf_req_id=c37844bd-3b5f-2c84-6515-f93c480fd27e tf_rpc=ApplyResourceChange timestamp=2023-12-08T11:00:04.939-0500

2023-12-08T11:00:04.939-0500 [ERROR] provider.terraform-provider-databricks_v1.29.0: Response contains error diagnostic: tf_proto_version=5.4 diagnostic_detail="" diagnostic_summary="cannot create mws networks: default auth: cannot configure default credentials. Config: host=https://accounts.cloud.databricks.com" tf_provider_addr=registry.terraform.io/databricks/databricks tf_req_id=c37844bd-3b5f-2c84-6515-f93c480fd27e @module=sdk.proto tf_resource_type=databricks_mws_networks @caller=/home/runner/work/terraform-provider-databricks/terraform-provider-databricks/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_severity=ERROR tf_rpc=ApplyResourceChange timestamp=2023-12-08T11:00:04.939-0500

2023-12-08T11:00:04.940-0500 [DEBUG] State storage *remote.State declined to persist a state snapshot

2023-12-08T11:00:04.940-0500 [ERROR] vertex "module.workspace.databricks_mws_networks.thisNet" error: cannot create mws networks: default auth: cannot configure default credentials. Config: host=https://accounts.cloud.databricks.com

 Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions

thains
New Contributor III

Ok. I found the issue here. We had a *second* place where we were setting up the databricks provider, which I had not updated with the proper client credentials.

View solution in original post

1 REPLY 1

thains
New Contributor III

Ok. I found the issue here. We had a *second* place where we were setting up the databricks provider, which I had not updated with the proper client credentials.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.