From 0acf9bfc87995462cd7c3461d9cac8f0f46cafb6 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Thu, 2 Mar 2023 16:14:55 +0100 Subject: [PATCH] fix(nebula): properwq data disk image --- modules/nebula/main.tf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/nebula/main.tf b/modules/nebula/main.tf index 88ea2be..2010daa 100644 --- a/modules/nebula/main.tf +++ b/modules/nebula/main.tf @@ -36,7 +36,8 @@ locals { data_disks = flatten([ for vm_key, vm in var.vms : [ for disk in vm.data_disks : { - name = "${vm_key}.${vm.domain}-data-${disk.name}" + vm_key = "${vm_key}.${vm.domain}" + name = disk.name size = disk.size persist = disk.persistent } @@ -65,7 +66,7 @@ resource "opennebula_image" "data" { for ds in local.data_disks : "${ds.vm_key}.${ds.name}" => ds } - name = each.value.name + name = "${each.value.vm_key}-data-${disk.name}" path = "https://vulcain.cadoles.com/empty_${each.value.size}" datastore_id = var.one_image_ds description = "Data disk of ${each.value.size} for ${each.value.vm_key}"