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

Documentation mismatch about `known_hosts` and `knownhosts` #876

Open CieNTi opened 2 years ago

CieNTi commented 2 years ago

System Information

Linux distribution

Fedora 34 (running all Terraform commands under Docker)

Terraform version

$ terraform -v
Terraform v1.0.4
on linux_amd64
+ provider registry.terraform.io/dmacvicar/libvirt v0.6.10
+ provider registry.terraform.io/hashicorp/cloudinit v2.2.0
+ provider registry.terraform.io/hashicorp/local v2.1.0

Provider and libvirt versions

$ terraform-provider-libvirt -version
/home/user/.terraform.d/plugin-cache/registry.terraform.io/dmacvicar/libvirt/0.6.10/linux_amd64/terraform-provider-libvirt_v0.6.10 0.6.10

Checklist


Description of Issue/Question

There is no official documentation on how to correctly set the known_hosts file, and the information found is confusing or wrong.

According the terraform-provider-libvirt page (or the GitHub source), and with some exceptions, the connection URIs will follow libvirt Connection URIs.

Taking a look into libvirt URIs Extra parameters, it is defined known_hosts as the expected parameter (and at the same time is not supported by ssh transport, which sounds really weird to me. It is maybe an errata, but I didn't checked it).

Taking a look into terraform-provider-libvirt code:

Apart of that, there is no example or documentation I could found about this.

Is this the expected behaviour, as official libvirt does not support known_hosts for ssh transport? Or it is just a terraform-provider-libvirt errata?

Thanks for your provider, time and support.

Not working setup

provider "libvirt" {
  uri = "qemu+ssh://user@host/system?known_hosts=/path/to/known_hosts"
}

Working setup

provider "libvirt" {
  uri = "qemu+ssh://user@host/system?knownhosts=/path/to/known_hosts"
}

Additional information:

Nothing to add