dmacvicar / terraform-provider-libvirt

Terraform provider to provision infrastructure with Linux's KVM using libvirt
Apache License 2.0
1.54k stars 457 forks source link

Failed to query available provider packages #848

Closed joshuacox closed 3 years ago

joshuacox commented 3 years ago

System Information

Attempted on both Ubuntu 18.04 and Arch linux from packaged binaries, and by building from source on arch with the latest terraform.

Linux distribution

Ubuntu 18.04 and Arch linux

Terraform version

terraform -v
Terraform v0.15.3
on linux_amd64

and from the packaged one:

terraform -v
Terraform v0.15.1
on linux_amd64

Your version of Terraform is out of date! The latest version
is 0.15.3. You can update by downloading from https://www.terraform.io/downloads.html

Provider and libvirt versions

~/.local/share/terraform/plugins/terraform-provider-libvirt -version
/home/thoth/.local/share/terraform/plugins/terraform-provider-libvirt 076b2da9551370b622307983059515b6ff83e37d
Compiled against library: libvirt 7.1.0
Using library: libvirt 7.1.0
Running hypervisor: QEMU 6.0.0
Running against daemon: 7.1.0

Checklist

Description of Issue/Question

Following the officials docs results in:

terraform init

Initializing the backend...

Initializing provider plugins...
- Finding dmacvicar/libvirt versions matching "0.6.2"...
- Finding latest version of hashicorp/template...
- Installing hashicorp/template v2.2.0...
- Installed hashicorp/template v2.2.0 (signed by HashiCorp)
╷
│ Error: Failed to query available provider packages
│ 
│ Could not retrieve the list of available versions for provider dmacvicar/libvirt: no available releases match the given constraints 0.6.2
╵

Setup

(Please provide the full main.tf file for reproducing the issue (Be sure to remove sensitive information) using the example here: https://github.com/dmacvicar/terraform-provider-libvirt/blob/master/examples/v0.13/ubuntu/ubuntu-example.tf

Steps to Reproduce Issue

  1. install terraform
  2. install terraform-provider-libvirt (I've tried both ~/.terraform.d/plugins/ and , .local/share/terraform/plugins/
  3. run terraform init in the example directory.

(Include debug logs if possible and relevant).

and on ubuntu 18.04:

➜  terraform-provider-libvirt git:(master) ✗ mkdir ~/.terraform.d/plugins/
➜  terraform-provider-libvirt git:(master) ✗ cp terraform-provider-libvirt ~/.terraform.d/plugins/
➜  terraform-provider-libvirt git:(master) ✗ cd examples/v0.13/ubuntu 
➜  ubuntu git:(master) ✗ terraform init

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/template...
- Finding dmacvicar/libvirt versions matching "0.6.2"...
- Installing hashicorp/template v2.2.0...
- Installed hashicorp/template v2.2.0 (signed by HashiCorp)
╷
│ Error: Failed to query available provider packages
│ 
│ Could not retrieve the list of available versions for provider dmacvicar/libvirt: provider registry registry.terraform.io does not have a
│ provider named registry.terraform.io/dmacvicar/libvirt
│ 
│ All modules should specify their required_providers so that external consumers will get the correct providers when using a module. To see
│ which modules are currently depending on dmacvicar/libvirt, run the following command:
│     terraform providers

Additional information:

Do you have SELinux or Apparmor/Firewall enabled? Some special configuration? no apparmor has been removed Have you tried to reproduce the issue without them enabled? I do not have them enabled.

joshuacox commented 3 years ago

it turns out I have to migrate to v0.13? https://github.com/dmacvicar/terraform-provider-libvirt/blob/master/docs/migration-13.md

this seems like it should be the default (or at least mentioned) on install?

dmacvicar commented 3 years ago

Please try with the new pre-release: https://registry.terraform.io/providers/dmacvicar/libvirt/latest