You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-32Lines changed: 35 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,52 +44,40 @@ What is *NOT* in scope:
44
44
45
45
This would make the mapping from terraform complicated and not maintanable. See the [How to contribute](CONTRIBUTING.md) section to understand how to approach new features.
46
46
47
-
## Getting the libvirt provider
47
+
## Getting started
48
48
49
-
The provide is available via the [Terraform Registry](https://registry.terraform.io/providers/dmacvicar/libvirt/latest).
49
+
The provide is available for auto-installation from the [Terraform Registry](https://registry.terraform.io/providers/dmacvicar/libvirt/latest).
50
50
51
-
You can also manually download it from the [releases section](https://github.com/dmacvicar/terraform-provider-libvirt/releases) on Github
51
+
In your `main.tf` file, specify the version you want to use:
52
52
53
-
## Building from source
54
53
55
-
### Requirements
54
+
```hcl
55
+
terraform {
56
+
required_providers {
57
+
libvirt = {
58
+
source = "dmacvicar/libvirt"
59
+
}
60
+
}
61
+
}
56
62
57
-
-[Go](https://golang.org/doc/install) is required for building.
*`mkisofs` is required to use the [CloudInit](website/docs/r/cloudinit.html.markdown)
74
-
*`xsltproc` is required to transform generated libvirt XML
75
-
76
-
[Copied from the Terraform documentation](https://www.terraform.io/docs/configuration/providers.html#third-party-plugins):
77
-
78
-
At present Terraform can automatically install only the providers distributed by HashiCorp. Third-party providers can be manually installed by placing their plugin executables in one of the following locations depending on the host operating system:
79
-
80
-
> On Linux and unix systems, in the sub-path `.terraform.d/plugins` in your user's home directory.
81
-
82
-
> On Windows, in the sub-path `terraform.d/plugins` beneath your user's "Application Data" directory.
83
-
84
-
terraform init will search this directory for additional plugins during plugin initialization.
85
-
86
-
## Using the provider
74
+
### Creating your first virtual machine
87
75
88
76
Here is an example that will setup the following:
89
77
90
78
+ A virtual server resource
91
79
92
-
(create this as libvirt.tf and run terraform commands from this directory):
80
+
(create this as main.tf and run terraform commands from this directory):
93
81
```hcl
94
82
provider "libvirt" {
95
83
uri = "qemu:///system"
@@ -117,11 +105,26 @@ $ terraform destroy
117
105
118
106
Look at more advanced examples [here](examples/)
119
107
108
+
## Manual installation
109
+
110
+
You can also manually download the provider from the [releases section](https://github.com/dmacvicar/terraform-provider-libvirt/releases) on Github. To install it, refer to the [Terraform documentation](https://www.terraform.io/docs/cli/config/config-file.html#provider-installation).
111
+
112
+
## Building from source
113
+
114
+
-[Go](https://golang.org/doc/install) is required for building.
The binary will be called `terraform-provider-libvirt`.
123
+
120
124
### Using multiple hypervisors / provider instances
121
125
122
126
You can target different libvirt hosts instantiating the [provider multiple times](https://www.terraform.io/docs/configuration/providers.html#multiple-provider-instances). [Example](examples/v0.12/multiple).
123
127
124
-
125
128
### Using qemu-agent
126
129
127
130
From its documentation, [qemu-agent](https://wiki.libvirt.org/page/Qemu_guest_agent):
0 commit comments