From 1fc775f4eea234bebf44ee12c3c78e388b4d02b8 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Fri, 7 Apr 2023 16:05:51 +0200 Subject: [PATCH] support data disks --- debian/main.tf | 7 ++++--- debian/variables.tf | 11 ++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/debian/main.tf b/debian/main.tf index 96f513c..842bede 100644 --- a/debian/main.tf +++ b/debian/main.tf @@ -14,13 +14,14 @@ module "tf_debian_vm" { source = "git::https://git.pim.kunis.nl/pim/tf-debian-vm.git" name = var.name admin_authorized_keys = coalesce(var.admin_authorized_keys, module.invariants.admin_authorized_keys) - insecure_password = coalesce(var.insecure_password, false) - use_host_cert = coalesce(var.use_host_cert, true) + insecure_password = var.insecure_password + use_host_cert = var.use_host_cert disk_pool = coalesce(var.disk_pool, module.invariants.disk_pool) disk_base = coalesce(var.disk_base, module.invariants.disk_base) disk_base_pool = coalesce(var.disk_base_pool, module.invariants.disk_base_pool) cloudinit_pool = coalesce(var.cloudinit_pool, module.invariants.cloudinit_pool) bridge_name = coalesce(var.bridge_name, module.invariants.bridge_name) ca_host = coalesce(var.ca_host, module.invariants.ca_host) - memory = coalesce(var.memory, 1024) + memory = var.memory + data_disks = var.data_disks } diff --git a/debian/variables.tf b/debian/variables.tf index ebaeee9..d631405 100644 --- a/debian/variables.tf +++ b/debian/variables.tf @@ -9,12 +9,12 @@ variable "admin_authorized_keys" { variable "insecure_password" { type = bool - default = null + default = false } variable "use_host_cert" { type = bool - default = null + default = true } variable "disk_pool" { @@ -49,5 +49,10 @@ variable "ca_host" { variable "memory" { type = number - default = null + default = 1024 +} + +variable "data_disks" { + type = list(string) + default = [] }