From 3e1cb1aed1f4e1f256dcbacd0555a91a43c755ec Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Tue, 23 Mar 2021 10:15:14 +0100 Subject: [PATCH] Try to fix network issue --- terraform/main.tf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index 4e6903b..f5a1934 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -59,14 +59,15 @@ module "vms" { cpu = each.value.cpu vcpu = each.value.vcpu ram = each.value.memory - dynamic "network_interfaces" - { + + network_interfaces = { for_each = each.value.network_interfaces - 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 system_image_name = each.value.disks.system.name