dmacvicar / terraform-provider-libvirt

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

allow specifying of target host machine on every individual resource/data source #1072

Open memetb opened 7 months ago

memetb commented 7 months ago

PR for issue #1071

The motivation of this PR is to allow proper abstractions when deploying to multiple host machines in a data center.

This PR adds an host argument to all resources and data sources. This argument is used for establishing a connection to the libvirt provider. If the argument is missing, the uri parameter of the provider is used as the default connection URI.

This feature allows for modules to determine where to allocate a specific resource inside a data center.

memetb commented 7 months ago

I have marked this as draft pending my cleanup of what looks like local merges from other PRs.

Specifically the PR #6 from memetb/graphics-none-option which is a PR that I merged on my forked repo.

For clarity, the present PR (#1072) is dependent on PR #1059 (the ssh upgrade) and that merge will not be reverted. There would be too much going back to make things work without it. So PR #1059 needs to be accepted before accepting #1072.

memetb commented 7 months ago

Incorrectly merged graphics-none-option has been removed. This PR is ready to go. Pending review.

As mentioned above, this PR is dependent on #1059, so reviewing and merging that PR will allow for easier review of this PR.