From a2f49ce4a8e23b7ecfcf5d2d46681bf9a632cd11 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Tue, 23 Mar 2021 10:06:27 +0100 Subject: [PATCH] Try to fix network issue --- terraform/main.tf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/terraform/main.tf b/terraform/main.tf index 15be071..e02fbcd 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -59,7 +59,10 @@ module "vms" { cpu = each.value.cpu vcpu = each.value.vcpu ram = each.value.memory - network_interfaces = each.value.network_interfaces + network_interfaces = { + for_each = each.value.network_interfaces + { network_id = opennebula_virtual_network.vnet[each.value.network_name].id, ip = opennebula_virtual_network.vnet[each.value.network_name].ip4} + } tag_labels = each.value.labels system_image_name = each.value.disks.system.name