forked from dmacvicar/terraform-provider-libvirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
48 lines (40 loc) · 872 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
provider "libvirt" {
uri = "qemu:///system"
}
provider "libvirt" {
alias = "remotehost"
uri = "qemu+ssh://[email protected]/system"
}
resource "libvirt_volume" "local-qcow2" {
name = "local-qcow2"
pool = "default"
format = "qcow2"
size = 100000
}
resource "libvirt_volume" "remotehost-qcow2" {
provider = libvirt.remotehost
name = "remotehost-qcow2"
pool = "default"
format = "qcow2"
size = 100000
}
resource "libvirt_domain" "local-domain" {
name = "local"
memory = "2048"
vcpu = 2
disk {
volume_id = libvirt_volume.local-qcow2.id
}
}
resource "libvirt_domain" "remotehost-domain" {
provider = libvirt.remotehost
name = "remotehost"
memory = "2048"
vcpu = 2
disk {
volume_id = libvirt_volume.remotehost-qcow2.id
}
}
terraform {
required_version = ">= 0.12"
}