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

feat: maas_network_interface_physical should work for devices #170

Open
danielsreichenbach opened this issue Apr 11, 2024 · 2 comments · May be fixed by #176
Open

feat: maas_network_interface_physical should work for devices #170

danielsreichenbach opened this issue Apr 11, 2024 · 2 comments · May be fixed by #176
Labels
enhancement New feature or request triaged Triaged to be addressed in a given cycle

Comments

@danielsreichenbach
Copy link

When creating a maas_network_interface_physical resource from a maas-device I would expect the network interface to be created. The MAAS API allows this and it would be a very helpful thing to have since one could then actually assign addresses to machines not managed by MAAS itself.

resource "maas_device" "test_01" {
  description = "test_01"
  hostname    = "test_01"
  domain      = maas_dns_domain.default.name
  zone        = "default"

  network_interfaces {
    mac_address = "AA:BB:CC:DD:EE:FF"
  }
}

resource "maas_network_interface_physical" "test_01" {
  machine     = maas_device.test_01.id
  mac_address = "AA:BB:CC:DD:EE:FF"
  name        = "eth0"
}

resource "maas_network_interface_link" "test_01" {
  machine           = maas_device.test_01.id
  network_interface = maas_network_interface_physical.test_01.id
  subnet            = maas_subnet.default.id
  mode              = "STATIC"
  ip_address        = "192.168.13.37"
  default_gateway   = true
}

I would expect this to produce an interface.

As far as I can tell, this is caused by the resource relying on https://github.com/maas/terraform-provider-maas/blob/4a03d32a5a869a50868c32a26b6689c378ed877e/maas/resource_maas_machine.go#L282 when it should actually query machines and devices instead.

@ednxzu
Copy link

ednxzu commented Apr 24, 2024

Yes, same issue here.

@skatsaounis
Copy link
Collaborator

Hi @danielsreichenbach, thank you for opening this issue. To me, this is more a feature rather than a bug. I will add the proper labels/title here and I will proceed with reviewing @ednxzu PR.

@skatsaounis skatsaounis added enhancement New feature or request triaged Triaged to be addressed in a given cycle labels May 22, 2024
@skatsaounis skatsaounis changed the title Bug: maas_network_interface_physical should work for devices feat: maas_network_interface_physical should work for devices May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged Triaged to be addressed in a given cycle
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants