Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opennebula_virtual_machine secondary IP #494

Open
TGM opened this issue Oct 12, 2023 · 5 comments
Open

opennebula_virtual_machine secondary IP #494

TGM opened this issue Oct 12, 2023 · 5 comments

Comments

@TGM
Copy link

TGM commented Oct 12, 2023

Description

Hello,

Can you please add support for addind secondary IPs in the opennebula_virtual_machie-nic resource?

Description: "Primary IP address assigned by OpenNebula",

New or affected resources and data sources

opennebula_virtual_machine

Potential terraform configuration

opennebula_virtual_machine "vm" {
   nic_alias = { 
        # Mandatory
        IP         = x.x.x.x
        NETWORK_ID = xxx
        PARENT     = NICx
      }
  }
}
@TGM
Copy link
Author

TGM commented Oct 23, 2023

Hey guys,

Any update on this? We tried an alternative approach using the template_section, but it does not keep track of the previous changed. Anyway it's a different bug that will become irrelevant once you implement NIC_ALIAS.

@TGM
Copy link
Author

TGM commented Nov 8, 2023

A potential resource allocation manner that could be suppassed by NIC_ALIAS.

  # dynamic "template_section" {
  #   for_each = {
  #     for k, v in opennebula_virtual_network_address_range.ar :
  #       k => v if try(v.custom.SECONDARY, false)
  #   }

  #   content {
  #     name = "NIC_ALIAS"

  #     elements = {
  #       # Mandatory
  #       IP         = template_section.value.ip4
  #       NETWORK_ID = template_section.value.virtual_network_id
  #       PARENT     = replace(template_section.value.custom.PARENT, "eth", "NIC")
  #     }
  #   }
  # }

Copy link

github-actions bot commented Dec 9, 2023

This issue is stale because it has been open for 30 days with no activity and it has not the 'status: confirmed' label or it is not in a milestone. Remove the 'status: stale' label or comment, or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2023
@frousselet frousselet reopened this Dec 20, 2023
@frousselet frousselet added this to the 1.5.0 milestone Jan 11, 2024
@TGM
Copy link
Author

TGM commented Jun 27, 2024

BUMP

@TGM
Copy link
Author

TGM commented Jun 28, 2024

This is allso a good alternative, if a parent is set than set the interface as alias, else do nothing.

dynamic "nic" {
  for_each = {
    for k, v in opennebula_virtual_network_address_range.ar :
      k => v if try(v.custom.PARENT, false)
  }

  content {
    model         = "virtio"
    virtio_queues = local.virtio_queues
    network_id    = nic.value.virtual_network_id
    ip            = nic.value.ip4

    parent        = optional parent interface
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants