paultyng/terraform-provider-unifi

Support for unifi network version 7.4.XX ?

Opened this issue ยท 7 comments

ednxzu commented

Ubiquiti released an update to (at least) the udm pro, and most of its hardware, bringing network v 7.4.XX, which changes quite a few things in terms of port configuration, port profiles, etc...
The current latest version of the provider does not work with it, most port_profile features are unusable (VLAN tagging doesnt work because of the changes on the unifi side).

Is a new version being worked on to support this new software version ?

Cheers,

We only support stable releases, I think 7.4 is still in EA?

ednxzu commented

Oh yes, you might be right. Sorry about that...

ednxzu commented

I'm reopening this issue since unifi network 7.4 has been GA'd

issacg commented

I just ran into this myself after an unplanned upgrade from 7.3

Basic functionality seems to still work, though I'm a bit paranoid of what is/isn't happening behind the scenes.

This snippet is working for me so far to replace the old built-in port_profiles. And since port_profiles are currently the only way to manage port_overrides on a switch device, that's the only way I seem to be able to work now.

I'm posting this in hopes of 1) inspiring others and 2) maybe getting critique on important things I may have overlooked in my rush job to fix this for myself.

data "unifi_network" "default" {
  name = "Default"
}

resource "unifi_port_profile" "all" {
  name = "All"

  forward               = "all"
  full_duplex           = "true"
  poe_mode              = "auto"
  native_networkconf_id = data.unifi_network.default.id
}

resource "unifi_port_profile" "disabled" {
  name     = "Disabled"
  forward  = "disabled"
  poe_mode = "off"
}
ednxzu commented

I "fixed" it aswell on my side a few months ago.

resource "unifi_port_profile" "trunk" {
  name                  = "trunk"
  autoneg               = true
  lldpmed_enabled       = false
  native_networkconf_id = unifi_network.default_network.id
  poe_mode              = "auto"
  forward               = "all"
}

resource "unifi_port_profile" "native_mgt" {
  name                  = "native_mgt"
  autoneg               = true
  lldpmed_enabled       = false
  native_networkconf_id = unifi_network.default_network.id
  poe_mode              = "auto"
}

resource "unifi_port_profile" "native_10" {
  name                  = "native_10"
  autoneg               = true
  lldpmed_enabled       = false
  native_networkconf_id = unifi_network.vlan_10.id
  poe_mode              = "auto"
}

resource "unifi_port_profile" "native_20" {
  name                  = "native_20"
  autoneg               = true
  lldpmed_enabled       = false
  native_networkconf_id = unifi_network.vlan_20.id
  poe_mode              = "auto"
}

Adding a single network to a port, or making a trunk profile works, even tho it's a hack.
Tagging multiple VLANs on a port is not possible with the current resource.
It's only possible to make single VLAN profiles untagged, or trunk profile.

I'm blocked on this as well

Update: changes have been made by this kind stranger. might be worth looking into at least for the port_profile port which I think it the most painful issue right now.