Closed lperrin-obs closed 2 years ago
For me I had to delete the .terraform
directory where my main.tf
/etc files were.
I also deleted the older version under my users home dir.
You could also try performing the init command again with TF_LOG=debug
set. https://www.terraform.io/docs/internals/debugging.html
I've tried to remove the .terraform directory but it's not better.
I activated the DEBUG but I didn't find explicit information :
terraform init -upgrade=true
2021-07-19T11:37:41.736+0200 [DEBUG] Adding temp file log sink: /tmp/user/1000/terraform-log213838621
2021-07-19T11:37:41.736+0200 [INFO] Terraform version: 1.0.2
2021-07-19T11:37:41.736+0200 [INFO] Go runtime version: go1.16.4
2021-07-19T11:37:41.736+0200 [INFO] CLI args: []string{"/usr/bin/terraform", "init", "-upgrade=true"}
2021-07-19T11:37:41.736+0200 [DEBUG] Attempting to open CLI config file: /home/fgzx6022/.terraformrc
2021-07-19T11:37:41.736+0200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2021-07-19T11:37:41.736+0200 [INFO] Loading CLI configuration from /home/fgzx6022/.terraform.d/credentials.tfrc.json
2021-07-19T11:37:41.736+0200 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2021-07-19T11:37:41.736+0200 [DEBUG] ignoring non-existing provider search directory /home/fgzx6022/.terraform.d/plugins
2021-07-19T11:37:41.736+0200 [DEBUG] will search for provider plugins in /home/fgzx6022/.local/share/terraform/plugins
2021-07-19T11:37:41.736+0200 [DEBUG] ignoring non-existing provider search directory /usr/share/ubuntu/terraform/plugins
2021-07-19T11:37:41.736+0200 [DEBUG] ignoring non-existing provider search directory /home/fgzx6022/.local/share/flatpak/exports/share/terraform/plugins
2021-07-19T11:37:41.736+0200 [DEBUG] ignoring non-existing provider search directory /var/lib/flatpak/exports/share/terraform/plugins
2021-07-19T11:37:41.736+0200 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2021-07-19T11:37:41.736+0200 [DEBUG] will search for provider plugins in /usr/share/terraform/plugins
2021-07-19T11:37:41.736+0200 [DEBUG] ignoring non-existing provider search directory /var/lib/snapd/desktop/terraform/plugins
2021-07-19T11:37:41.737+0200 [INFO] CLI command args: []string{"init", "-upgrade=true"}
Initializing the backend...
2021-07-19T11:37:41.738+0200 [DEBUG] New state was assigned lineage "11e3971f-1f2d-fa8e-8541-cb8eda0283f1"
2021-07-19T11:37:41.738+0200 [WARN] Failed to determine selected providers: 1 error occurred:
* there is no package for registry.terraform.io/dmacvicar/libvirt 0.6.3 cached in .terraform/providers
2021-07-19T11:37:41.738+0200 [DEBUG] checking for provisioner in "."
2021-07-19T11:37:41.743+0200 [DEBUG] checking for provisioner in "/usr/bin"
2021-07-19T11:37:41.743+0200 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory
Initializing provider plugins...
- Finding dmacvicar/libvirt versions matching "0.6.10"...
╷
│ 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.10
I finally resolved the issue by removing the 0.6.3 version installed with deb.
System Information
Linux distribution
Ubuntu 20.04
Terraform version
Provider and libvirt versions
Checklist
[ ] Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?
[X] Is it a bug or something that does not work as expected? Please make sure you fill the version information below:
Description of Issue/Question
I'm trying to upgrade the libvirt provider from 0.6.3 (installed with package) to 0.6.10.
Setup
Steps to Reproduce Issue
Additional information:
Do you have SELinux or Apparmor/Firewall enabled? no Have you tried to reproduce the issue without them enabled?