You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A project requires us to deploy VMs with multiple NICs in the same network, with different asigned IPs.
However, the terraform provider doesn't seem to allow us to do that.
resource"opennebula_virtual_machine""loadcore_agent-dn1" {
name="reference-loadcore_agent-dn1"template_id=162cpu=4vcpu=4memory=8192context={
NETWORK ="YES"
SET_HOSTNAME ="$NAME"
USERNAME ="jenkins"
}
nic {
model="virtio"network_id=opennebula_virtual_network.vnet-private_oneKE.id
}
nic {
model="virtio"network_id=opennebula_virtual_network.vnet-private_oneKE.id
}
}
Expected behavior
Deploys a VM with 2 NICs in vnet vnet-private_oneKE
Actual behavior
│ Error: Duplicate object key
│
│ on tf-loadcore_agent-dn1.tf line 34, in output "loadcore_agent-dn1-ips":
│ 34: value = { for nic in opennebula_virtual_machine.loadcore_agent-dn1.nic[*] : nic.network_id => nic.computed_ip }
│ ├────────────────
│ │ nic.network_id is 603
│
│ Two different items produced the key "603" in this 'for' expression. If duplicates are expected, use the ellipsis (...) after the value expression to enable grouping by key.
╵
Steps to Reproduce
Create a vnet and try deploying a VM with 2 NICs from it.
Debug output
No response
Panic output
No response
Important factoids
No response
References
No response
EDIT: block for the error output
The text was updated successfully, but these errors were encountered:
Description
A project requires us to deploy VMs with multiple NICs in the same network, with different asigned IPs.
However, the terraform provider doesn't seem to allow us to do that.
Terraform and Provider version
Terraform v1.9.7
on linux_amd64
Affected resources and data sources
opennebula_virtual_machine
opennebula_virtual_network
Terraform configuration
Expected behavior
Deploys a VM with 2 NICs in vnet
vnet-private_oneKE
Actual behavior
Steps to Reproduce
Create a vnet and try deploying a VM with 2 NICs from it.
Debug output
No response
Panic output
No response
Important factoids
No response
References
No response
EDIT: block for the error output
The text was updated successfully, but these errors were encountered: