Terraform v0.13.0
terraform {
required_version = ">= 0.13"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "2.23.0"
}
databricks = {
source = "databrickslabs/databricks"
version = "0.2.3"
}
local = {
source = "hashicorp/local"
}
random = {
source = "hashicorp/random"
}
}
}
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider -/databricks:
provider registry registry.terraform.io does not have a provider named
registry.terraform.io/-/databricks
terraform init succeed
terraform init fails
terraform initIt still happens to me trying to user databricks provider... terraform creates a folder - and copies all its own providers to it, but it doesn't copy other providers, for me its databricks
'-' folder

databrickslabs folder

workaround... manual copy the folder of the provider to - folder


Just need to think If you're going to automate this, creating a scripts that copies the folder while this is fixed
Hi @dgonzalezp , thanks for reporting this and I'm sorry you're experiencing this confusing behavior!
Terraform v0.13 pulls a list of providers from both the state and configuration when determining provider requirements - you can run terraform providers to see this in action. Terraform v0.12 has no concept of 'namespaces', so when it encounters a provider named "databricks" it queries a special "alises" table in the registry, which is where that odd-looking "-/databricks" (and other providers) come from. Since that provider is not a hashicorp provider, it's unable to find it.
You can fix this by using the terraform state replace-provider command to update your statefile with the databricks providers' source address :
terraform state replace-provider -/databricks registry.terraform.io/databrickslab/databricks
For anyone else interested in this issue, this information is in the upgrade guide, but rather hard to find in the in-house providers section.
Thanks again, and sorry for the confusion!
Great! Thank you for your answer! @mildwonkey
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.