File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,16 @@ provider "libvirt" {
3
3
uri = " qemu:///system"
4
4
}
5
5
6
+ resource "libvirt_pool" "ubuntu" {
7
+ name = " ubuntu"
8
+ type = " dir"
9
+ path = " /tmp/terraform-provider-libvirt-pool-ubuntu"
10
+ }
11
+
6
12
# We fetch the latest ubuntu release image from their mirrors
7
13
resource "libvirt_volume" "ubuntu-qcow2" {
8
14
name = " ubuntu-qcow2"
9
- pool = " default "
15
+ pool = " ${ libvirt_pool . ubuntu . name } "
10
16
source = " https://cloud-images.ubuntu.com/releases/xenial/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img"
11
17
format = " qcow2"
12
18
}
@@ -27,6 +33,7 @@ resource "libvirt_cloudinit_disk" "commoninit" {
27
33
name = " commoninit.iso"
28
34
user_data = " ${ data . template_file . user_data . rendered } "
29
35
network_config = " ${ data . template_file . network_config . rendered } "
36
+ pool = " ${ libvirt_pool . ubuntu . name } "
30
37
}
31
38
32
39
# Create the machine
You can’t perform that action at this time.
0 commit comments