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

Could not retrieve the list of available versions for provider dmacvicar/libvirt #972

Open Nassiel opened 1 year ago

Nassiel commented 1 year ago

Linux distribution

Archlinux 5.19.5

Terraform version

Terraform v1.2.8
on linux_amd64

Provider and libvirt versions

 provider registry.terraform.io/dmacvicar/libvirt v0.6.2

Description of Issue/Question

If in the configuration file of the provider for terraform I introduce this:

terraform {
  required_providers {
    libvirt = {
      source = "dmacvicar/libvirt"
      version = "0.6.14"
    }
  }
}

provider "libvirt" {
  # Configuration options
}

I get this error:

│ 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.14

But, If on the other hand I put this:

terraform {
  required_providers {
    libvirt = {
      source = "dmacvicar/libvirt"
      version = ">= 0.6"
    }
  }
}

provider "libvirt" {
  # Configuration options
}

Then, I got version 0.6.2 installed, which, according to the terraform registry, was never uploaded.

Another example. if I run a simple kubitect apply, which downloads a specific version of terraform, the result is precisely the same.

makdiuk commented 1 year ago

The same case was related to different versions in provider.tf inside the module and root directory Please check all providers.tf files and set the same version in all files.

terraform {
  required_providers {
    libvirt = {
      source  = "dmacvicar/libvirt"
      version = "0.7.1"
    }
  }
}