This is a terraform provider that lets you provision servers on a libvirt host via Terraform.
You should update your .terraformrc and refer to the binary:
providers {
libvirt = "/usr/bin/terraform-provider-libvirt"
}
Using the provider
Here is an example that will setup the following:
A virtual server resource
(create this as libvirt.tf and run terraform commands from this directory):
provider "libvirt" {
uri = "qemu:///system"
}
You can also set the URI in the LIBVIRT_DEFAULT_URI environment variable.
Now, define a libvirt domain:
resource "libvirt_domain" "terraform_test" {
name = "terraform_test"
}
Now you can see the plan, apply it, and then destroy the infrastructure:
$ terraform plan
$ terraform apply
$ terraform destroy
|