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

[Feature Request] Data Sources #930

Open adamency opened 2 years ago

adamency commented 2 years ago

Would it be feasible to implement the resources already included in the provider as data sources too ?

I have separate modules on my machine for which I want to reuse e.g. networks or storage pools created externally either with Terraform or without.

For resources created with this provider, It would be great to have data sources in order to simply fetch for the given resource without having to import it in Terraform as a managed resource in the module in question as we can want the resource to not be managed in this specific module.

Secondly, for resources created without Terraform, this would be the only way to use them without having to destroy them and recreate them within Terraform.

I think this is the missing feature that would make libvirt a viable cloud provider for production-grade environments.

Lastly, thanks a lot for your already done work in helping bringing FOSS infrastructure up to speed with big cloud providers. This project is very important, you should consider opening a donation option for the project (opencollective, etc...) to strenghten its sustainability and longevity :).

adamency commented 2 years ago

After some more research in the issues of the project, I found one already referencing data sources, albeit with an incorrect name, here it is: #884 .