{"id":20140611,"url":"https://github.com/goffinet/terraform-libvirt","last_synced_at":"2025-03-02T23:24:54.407Z","repository":{"id":116034492,"uuid":"294932757","full_name":"goffinet/terraform-libvirt","owner":"goffinet","description":"Terraforms examples with terraform-provider-libvirt","archived":false,"fork":false,"pushed_at":"2020-09-14T11:59:46.000Z","size":198,"stargazers_count":16,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-13T10:22:07.458Z","etag":null,"topics":["terraform-libvirt","terraform-project"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goffinet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-12T11:45:16.000Z","updated_at":"2024-05-25T18:49:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"df573f20-7116-4263-ac77-d4b78b676e9a","html_url":"https://github.com/goffinet/terraform-libvirt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goffinet%2Fterraform-libvirt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goffinet%2Fterraform-libvirt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goffinet%2Fterraform-libvirt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goffinet%2Fterraform-libvirt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goffinet","download_url":"https://codeload.github.com/goffinet/terraform-libvirt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241584641,"owners_count":19986195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["terraform-libvirt","terraform-project"],"created_at":"2024-11-13T21:52:48.016Z","updated_at":"2025-03-02T23:24:54.381Z","avatar_url":"https://github.com/goffinet.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform with Libvirt/KVM provider\n\nTerraforms examples with [terraform-provider-libvirt](https://github.com/dmacvicar/terraform-provider-libvirt/).\n\nI use qemu/KVM images built with packer thanks to this project : [packer-kvm](https://github.com/goffinet/packer-kvm). They are regularly published on a website.\n\nOnly for education and learning purposes. Do not use it in production.\n\n## What is Terraform?\n\nTerraform is an Infrastructure as Code (IaC) tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions.\n\nConfiguration files describe to Terraform the components needed to run a single application or your entire datacenter. Terraform generates an execution plan describing what it will do to reach the desired state, and then executes it to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied.\n\nThe infrastructure Terraform can manage includes low-level components such as compute instances, storage, and networking, as well as high-level components such as DNS entries, SaaS features, etc.[What is Terraform?](https://www.terraform.io/intro/index.html)\n\nHere we use the third party [terraform-provider-libvirt](https://github.com/dmacvicar/terraform-provider-libvirt/) to manage Libvirt resources as networks, storage pools, volumes, template for cloud-init iso disk with count functions and any [provisioners](https://www.terraform.io/docs/provisioners/index.html).\n\n## Local installation\n\nSetup a local installation on your virtualization host with Libvirt, Terraform and the Libvirt provider plugin for Terraform (Ubuntu bionic) :\n\n```\ngit clone https://github.com/goffinet/terraform-libvirt\ncd terraform-libvirt/\nbash -x setup.sh\n```\n\n## Projects\n\n- [basics examples](https://github.com/goffinet/terraform-libvirt/tree/master/basics) terraform-provider-libvirt resources based on contribs.\n- [network labs](https://github.com/goffinet/terraform-libvirt/tree/master/labs) ported from bash.\n\n## Deploy with terraform\n\n```bash\ngit clone https://github.com/goffinet/terraform-libvirt\ncd terraform-libvirt/basics/ubuntu\nterraform plan\n```\n\n## Use Docker\n\n```\ncd terraform-libvirt/basics/ubuntu\ndocker run --rm --privileged --cap-add=ALL \\\n-v /lib/modules:/lib/modules \\\n-v /var/lib/libvirt:/var/lib/libvirt \\\n-v /var/log:/var/log \\\n-v /run:/run \\\n-v `pwd`:/opt/ \\\n-w /opt/ \\\n-it \\\ngoffinet/terraform terraform init\n```\n\n## Deploy a routing lab with Terraform on Libvirt/KVM\n\nSee [this routing lab with 8 VMs](labs/103/README.md).\n\n![](labs/103/lab103-ospf-quad-pod_small.png)\n\n## References\n\n- https://github.com/dmacvicar/terraform-provider-libvirt\n- https://hub.docker.com/r/larsks/libvirt/dockerfile\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoffinet%2Fterraform-libvirt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoffinet%2Fterraform-libvirt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoffinet%2Fterraform-libvirt/lists"}