Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.28 KB

index.html.markdown

File metadata and controls

50 lines (37 loc) · 1.28 KB
layout page_title sidebar_current description
libvirt
Provider: libvirt
docs-libvirt-index
The Libvirt provider is used to interact with Linux KVM/libvirt hypervisors. The provider needs to be configured with the proper connection information before it can be used.

Libvirt Provider

The Libvirt provider is used to interact with Linux libvirt hypervisors.

The provider needs to be configured with the proper connection information before it can be used.

~> Note: while libvirt can be used with several types of hypervisors, this provider focuses on KVM. Other drivers may not be working and haven't been tested.

Example Usage

# Configure the Libvirt provider
provider "libvirt" {
  uri = "qemu:///system"
}

# Create a new domain
resource "libvirt_domain" "test1" {
  ...
}

Configuration Reference

The following keys can be used to configure the provider.

  • uri - (Required) The connection URI used to connect to the libvirt host.

Environment variables

The libvirt connection URI can also be specified with the LIBVIRT_DEFAULT_URI shell environment variable.

$ export LIBVIRT_DEFAULT_URI="qemu+ssh://[email protected]/system"
$ terraform plan