fix(nebula): actually use the data disks in the templates

This commit is contained in:
Philippe Caseiro 2023-03-02 17:13:08 +01:00
parent a8c3955121
commit 77eec91bf1
1 changed files with 8 additions and 4 deletions

View File

@ -99,11 +99,15 @@ resource "opennebula_template" "vm_template" {
image_id = opennebula_image.system[each.key].id
}
/* Not needed now
disk {
image_id = opennebula_image.data[each.key].id
dynamic "disk" {
for_each = {
for ds in local.data_disks : "${ds.vm_key}.${ds.name}" => ds if "${each.key}.${each.value.domain}" == ds.vm_key
}
iterator = current_disk
content {
image_id = opennebula_image.data[current_disk.key].id
}
}
*/
//sched_ds_requirements = ( each.value.sysdatastore != "" ? "ID=\"${each.value.sysdatastore}\"" : "ID=\"${var.one_sys_datastore}\"" )
sched_ds_requirements = ( each.value.sysdatastore != "" ? "ID=\"${each.value.sysdatastore}\"" : "" )