terraform-provider-maas icon indicating copy to clipboard operation
terraform-provider-maas copied to clipboard

Ability to set VLAN's primary controller for dhcp

Open rmammadli opened this issue 1 year ago • 4 comments

Hi, We are facing an issue during dhcp turning on for certain vlan.

main.tf

...
resource "maas_vlan" "vlan" {
  fabric = maas_fabric.fabric.id
  vid    = 20
  dhcp_on = true
  name   = "tf-vlan20"
  space  = maas_space.space.name
}

Terraform execution terraform apply

Error message

│ Error: ServerError: 400 Bad Request ({"__all__": ["dhcp can only be turned on when a primary rack controller is set."]})
│
│   with maas_vlan.vlan["tf-vlan20"],
│   on main.tf line 12, in resource "maas_vlan" "vlan":
│   12: resource "maas_vlan" "vlan" {

Expected result dhcp for vlan is turned on

Note dhcp can be easily enabled in UI for this vlan manually.

Feature request Would it be possible to add an option in resource 'maas_vlan' to define:

  • rack controller to be selected or
  • relay to another VLAN

rmammadli avatar Mar 24 '23 09:03 rmammadli

This is still an issue in the latest provider version. Are there any plans regarding this ?

ednxzu avatar Mar 26 '24 23:03 ednxzu

DHCP relay would be really nice to have via TF API

sempervictus avatar Jun 27 '24 05:06 sempervictus

is there a workaround for this?

VariableDeclared avatar Aug 12 '24 14:08 VariableDeclared

Experiencing this problem too, it is not possible to setup dhcp_on, using terraform, because it requires the rack controller.

rvalle avatar Aug 15 '24 17:08 rvalle