โ11-09-2022 01:03 AM
Hi team,
I started getting this message lately when trying add some new config or change my workspace with terraform :
Error: cannot create global init script: authentication is not configured for provider. Please check https://registry.terraform.io/providers/databricks/databricks/latest/docs#authentication for details
on the TF code all ok and as below:
Im using TF version terraform-1.0.11
What could have been change?
Thanks!
โ11-09-2022 06:20 AM
Hi @Avi Edriโ looks like you are using a provider that is authenticated to the Accounts console (https://accounts.cloud.databricks.com) to create a global init script within the workspace. Can you try authentication with host and PAT token? Follow this doc
The host will be your workspace URL.
Use two providers, one with username-password auth and one with host-PAT auth for Account level management and workspace-level management respectively.
Let me know if this answers your question.
โ11-09-2022 03:01 AM
Hi @Avi Edriโ ,
can you please provide more details, where you are getting this error?
one option is that, you have setup .databrickscfg with the [DEFAULT] profile.
or
maybe you are not using alias while creating resource?
resource "databricks_grants" "this" {
provider = databricks.workspace
...
}
where this error is thrown exactly?
provider "databricks" looks ok to me
โ11-09-2022 05:21 AM
Hi Pat,
Since i have 2 workspaces on my account ( dev and prod ) , i suspect im missing some specific configuration.
I checked and no .databrickscfg file i have on my mac.
In general im trying to add another databricks instance profile via TF.
Thanks
โ11-09-2022 06:20 AM
Hi @Avi Edriโ looks like you are using a provider that is authenticated to the Accounts console (https://accounts.cloud.databricks.com) to create a global init script within the workspace. Can you try authentication with host and PAT token? Follow this doc
The host will be your workspace URL.
Use two providers, one with username-password auth and one with host-PAT auth for Account level management and workspace-level management respectively.
Let me know if this answers your question.
โ11-09-2022 07:27 AM
Thank you @Vivian Wilfredโ
yes it is working now
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group