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}"