Try to fix network issue
This commit is contained in:
parent
3e1cb1aed1
commit
aa044e98f7
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue