terraform-provider-libvirt: uri parameter in the provider block is broken/being ignored

System Information

Linux distribution

Ubuntu..

Terraform version

1.6.0

Provider and libvirt versions

v0.7.4


It seems the uri is being ignored on the most recent version. It just tries to use a local libvirt sock instead of making the ssh connection. Luckily I still had the 0.7.1 version in disk so I changed it and it’s working again. The problem is I can’t download that version due to the key signing issue.

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Reactions: 1
  • Comments: 22 (2 by maintainers)

Most upvoted comments

All versions 0.7.* ignore uri and work only local. 0.6.14 work good.

provider “libvirt” { uri = “qemu+ssh://login@servername/system” }

Until there is a new release with the fix, people needing an urgent workaround can add the “name” parameter, which makes the bugged function return before the bug manifests.

For instance, if the URI is qemu+ssh://user@host/system?blablabla you can change it to qemu+ssh://user@host/system?name=qemu%3A%2F%2F%2Fsystem&blablabla

In this example, the name parameter is set to qemu:///system in a URL-encoded format. This value was chosen by hand, following the algorithm described in the documentation (i.e. keeping only what is before the + sign, the string “😕/”, followed by the path, including the leading slash, and leaving out the user, the @ sign, the host, and the query string).

Please remember to remove the workaround when the new version is released, as this is a bit dirty ^^

When will there be a release with this fix?

I believe this issue has the same root cause that the issue that I helped identify in #1040 . Can you retry with the fix that was merged earlier today?

I had the same issue and tested against 8d7c58f67508ee9a958a6de98a722818edc75654. This fixed the issue for me. Thanks 👍