fix(nebula): properwq data disk image
This commit is contained in:
parent
18365fdf80
commit
0acf9bfc87
|
@ -36,7 +36,8 @@ locals {
|
||||||
data_disks = flatten([
|
data_disks = flatten([
|
||||||
for vm_key, vm in var.vms : [
|
for vm_key, vm in var.vms : [
|
||||||
for disk in vm.data_disks : {
|
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
|
size = disk.size
|
||||||
persist = disk.persistent
|
persist = disk.persistent
|
||||||
}
|
}
|
||||||
|
@ -65,7 +66,7 @@ resource "opennebula_image" "data" {
|
||||||
for ds in local.data_disks : "${ds.vm_key}.${ds.name}" => ds
|
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}"
|
path = "https://vulcain.cadoles.com/empty_${each.value.size}"
|
||||||
datastore_id = var.one_image_ds
|
datastore_id = var.one_image_ds
|
||||||
description = "Data disk of ${each.value.size} for ${each.value.vm_key}"
|
description = "Data disk of ${each.value.size} for ${each.value.vm_key}"
|
||||||
|
|
Loading…
Reference in New Issue