commit 8b7af20ce453855312e7174e74b7b6cfd0966536
parent 7d4005ec66c3631fccf8f5db0d7521d8f8743348
Author: Andreas Gruhler <andreas.gruhler@adfinis-sygroup.ch>
Date: Tue, 7 Apr 2020 14:16:33 +0200
add disk size
Diffstat:
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libvirt/terraform/terraform.tfvars.example b/libvirt/terraform/terraform.tfvars.example
@@ -3,5 +3,5 @@ hosts = ["myCluster01", "myCluster02"]
# network = "10.66.3.0/24"
# vcpu = 1
# memory = 1024
-# disk = 13
+# disk = 12000000000
# baseimage = "https://cloud-images.ubuntu.com/releases/xenial/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img"
\ No newline at end of file
diff --git a/libvirt/terraform/variables.tf b/libvirt/terraform/variables.tf
@@ -20,7 +20,8 @@ variable "memory" {
variable "disk" {
type = number
- default = 12
+ default = "12000000000"
+ description = "The size of the libvirt volume in bytes (default 12G)"
}
variable "cloudinit_iso" {
diff --git a/libvirt/terraform/vms.tf b/libvirt/terraform/vms.tf
@@ -33,6 +33,7 @@ resource "libvirt_volume" "volume" {
name = "${var.project}-cow-${each.value}"
pool = libvirt_pool.pool.name
base_volume_id = libvirt_volume.base_volume.id
+ size = var.disk
}