diff --git a/data/data/libvirt/main.tf b/data/data/libvirt/main.tf index df475cf29cc..dc918c07160 100644 --- a/data/data/libvirt/main.tf +++ b/data/data/libvirt/main.tf @@ -2,17 +2,17 @@ provider "libvirt" { uri = "${var.tectonic_libvirt_uri}" } -module "libvirt_base_volume" { - source = "./volume" - - image = "${var.tectonic_os_image}" +resource "libvirt_volume" "base" { + name = "coreos_base" + source = "${var.tectonic_os_image}" + size = 17179869184 } module "bootstrap" { source = "./bootstrap" addresses = ["${var.tectonic_libvirt_bootstrap_ip}"] - base_volume_id = "${module.libvirt_base_volume.coreos_base_volume_id}" + base_volume_id = "${libvirt_volume.base.id}" cluster_name = "${var.tectonic_cluster_name}" ignition = "${var.ignition_bootstrap}" network_id = "${libvirt_network.tectonic_net.id}" @@ -21,7 +21,7 @@ module "bootstrap" { resource "libvirt_volume" "master" { count = "${var.tectonic_master_count}" name = "master${count.index}" - base_volume_id = "${module.libvirt_base_volume.coreos_base_volume_id}" + base_volume_id = "${libvirt_volume.base.id}" } resource "libvirt_ignition" "master" { diff --git a/data/data/libvirt/volume/main.tf b/data/data/libvirt/volume/main.tf deleted file mode 100644 index 73ea8166dc9..00000000000 --- a/data/data/libvirt/volume/main.tf +++ /dev/null @@ -1,4 +0,0 @@ -resource "libvirt_volume" "coreos_base" { - name = "coreos_base" - source = "${var.image}" -} diff --git a/data/data/libvirt/volume/outputs.tf b/data/data/libvirt/volume/outputs.tf deleted file mode 100644 index d09ad90f82d..00000000000 --- a/data/data/libvirt/volume/outputs.tf +++ /dev/null @@ -1,3 +0,0 @@ -output "coreos_base_volume_id" { - value = "${libvirt_volume.coreos_base.id}" -} diff --git a/data/data/libvirt/volume/variables.tf b/data/data/libvirt/volume/variables.tf deleted file mode 100644 index 43471f87961..00000000000 --- a/data/data/libvirt/volume/variables.tf +++ /dev/null @@ -1,4 +0,0 @@ -variable "image" { - description = "The URL of the OS disk image" - type = "string" -}