-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Error: Failed to query available provider packages #270
Comments
I'm getting a similar error I have variable "do_token" {}
provider "digitalocean" {
token = var.do_token
} then when I run terraform init I get
|
Oh, I figured it out. @scheung38 try adding this terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
}
}
} |
Error: Failed to query available provider packages Could not retrieve the list of available versions for provider If you have just upgraded directly from Terraform v0.12 to Terraform v0.14 Did you intend to use digitalocean/digitalocean? If so, you must specify that I am using terraform 14.5 on Windows10 very simple code .. resource "digitalocean_droplet" "mydroplet" { |
It worked after adding below mentioned provider block terraform { |
|
Thanks it worked for me too |
Provider examples were created to use terraform 0.12.x. They has not been updated yet, to use tf 0.13.x and As mentioned, this will make the example works terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = "X.Y.Z"
}
}
} Anyway, PR #272 has been submitted to update DO examples. Once reviewed, it would be merged. |
@rawmind0 , Yes, now that you mention it, the issue originally reported by @scheung38 above is actually what started me down the path of working on PR #272 . I am currently working on a similar example template for Linode. Also, since I'm hearing rumours that RancherOS may soon be abandoned, I'll plan to review the DO example again once DigitalOcean themselves decide which container OS to include in their staff-maintained images. Presently, RancherOS is the only option there, though. |
@jadamcraig , thanks for working on that PR. RancherOS may be fine by the moment, but it's arriving to EOL soon, rancher/os#3000 (comment) |
terraform { |
In our case the issue was related to the lack of the Root module - # Terraform settings
terraform {
required_version = "~> 1.6"
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = "~> 2.0"
}
}
} Child module - # Terraform settings
terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = "~> 2.0"
}
}
} Reference |
Cloned this repo and without changing anything other than providing the Digital Ocean key:
export DIGITALOCEAN_TOKEN='Token from Digital Ocean'
Steps to produce:
cd terraform-provider-rke/examples/digitalocean
terraform init
Warning: Interpolation-only expressions are deprecated
on rke.tf line 64, in resource "rke_cluster" "cluster":
64: addons = "${data.template_file.addons.rendered}"
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
hashicorp/digitalocean: provider registry registry.terraform.io does not have
a provider named registry.terraform.io/hashicorp/digitalocean
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider hashicorp/rke:
provider registry registry.terraform.io does not have a provider named
registry.terraform.io/hashicorp/rke
(.venv) ➜ digitalocean git:(master) terraform --version
Terraform v0.14.2
Mac Big Sur: 11.1
The text was updated successfully, but these errors were encountered: