Try to fix network issue

This commit is contained in:
Philippe Caseiro 2021-03-23 10:24:24 +01:00
parent 3e1cb1aed1
commit aa044e98f7
2 changed files with 2 additions and 8 deletions

View File

@ -60,13 +60,7 @@ module "vms" {
vcpu = each.value.vcpu vcpu = each.value.vcpu
ram = each.value.memory ram = each.value.memory
network_interfaces = { network_interfaces = each.value.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 tag_labels = each.value.labels

View File

@ -71,7 +71,7 @@ resource "opennebula_template" "vm_template" {
for_each = var.network_interfaces for_each = var.network_interfaces
content { content {
network_id = nic.value.network_id network_id = opennebula_virtual_network.vnet[nic.value.network_name].id
model = "virtio" model = "virtio"
ip = nic.value.ip ip = nic.value.ip
} }