From 1cdaebf4b3dd1f91e1a90b75960bcc52aa626757 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Tue, 23 Mar 2021 10:12:24 +0100 Subject: [PATCH] Try to fix network issue --- terraform/main.tf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index e02fbcd..4e6903b 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -59,9 +59,13 @@ module "vms" { cpu = each.value.cpu vcpu = each.value.vcpu ram = each.value.memory - network_interfaces = { + dynamic "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} + content { + 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