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

VM NICs are not attached anymore #289

Closed
treywelsh opened this issue Jun 14, 2022 · 1 comment · Fixed by #290
Closed

VM NICs are not attached anymore #289

treywelsh opened this issue Jun 14, 2022 · 1 comment · Fixed by #290

Comments

@treywelsh
Copy link
Collaborator

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Provider version 0.5.0
Tested against terraform 0.15.5

Affected Resource(s)

  • opennebula_virtual_machine

Terraform Configuration Files

resource "opennebula_virtual_network" "network1" {
  name   = "test-net1"
  type   = "dummy"
  bridge = "onebr"
  mtu    = 1500
  ar {
    ar_type = "IP4"
    size    = 12
    ip4     = "172.16.100.130"
  }
  permissions     = "642"
  group           = "oneadmin"
  security_groups = [0]
  clusters        = [0]
}

resource "opennebula_virtual_machine" "test" {
  name        = "test-virtual_machine"
  group       = "oneadmin"
  permissions = "642"
  memory      = 128
  cpu         = 1

  context = {
    NETWORK      = "YES"
    SET_HOSTNAME = "$NAME"
  }

  nic {
    network_id      = opennebula_virtual_network.network1.id
    ip              = "172.16.100.131"
  }
}

Expected Behavior

A NIC should be attached

Actual Behavior

No NICS are attached to the virtual machine.
It's due to some refactoring I did around VM, template and virtual router related resources. I tried to mutualize as much code as I can but I forgot the piece of code that generate the NIC template

Steps to Reproduce

  1. terraform apply

Important Factoids

References

The problem was introduced by #170

@treywelsh
Copy link
Collaborator Author

#304 explains why we didn't see the problem via the acceptance tests

treywelsh added a commit that referenced this issue Jun 28, 2022
frousselet pushed a commit that referenced this issue Jun 28, 2022
frousselet pushed a commit that referenced this issue Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant