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

Provider update #429

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Provider update #429

wants to merge 7 commits into from

Conversation

akerl
Copy link

@akerl akerl commented Nov 26, 2023

This bundles a couple of updates:

  1. Allows "skip" to keep WLAN passphrases out of state files (which would partially resolve Shift WLAN passphrase to separate resource #389 )
  2. Updates the go-unifi module to 1.33
  3. Adjusts port profiles and network resources to account for API changes in v7 and v8 of the Unifi network application

I've also published a version of this provider from my fork that incorporates the above: https://registry.terraform.io/providers/akerl/unifi/latest

I did this largely for my own benefit, since I use this module and didn't want to have to manually install it, but if it's useful for other folks, all the better.

Copy link

@chalk-hwang chalk-hwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NATiveNetworkID looks like it was named incorrectly, is it intentional?

@@ -372,6 +379,7 @@ func toPortOverride(data map[string]interface{}) (unifi.DevicePortOverrides, err
OpMode: opMode,
PoeMode: poeMode,
AggregateNumPorts: aggregateNumPorts,
NATiveNetworkID: nativeNetworkID,
Copy link

@chalk-hwang chalk-hwang Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NATiveNetworkID: nativeNetworkID,
NativeNetworkID: nativeNetworkID,

@@ -383,6 +391,7 @@ func fromPortOverride(po unifi.DevicePortOverrides) (map[string]interface{}, err
"op_mode": po.OpMode,
"poe_mode": po.PoeMode,
"aggregate_num_ports": po.AggregateNumPorts,
"native_network_id": po.NATiveNetworkID,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"native_network_id": po.NATiveNetworkID,
"native_network_id": po.NativeNetworkID,

Isolation: d.Get("isolation").(bool),
LldpmedEnabled: d.Get("lldpmed_enabled").(bool),
LldpmedNotifyEnabled: d.Get("lldpmed_notify_enabled").(bool),
NATiveNetworkID: d.Get("native_networkconf_id").(string),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NATiveNetworkID: d.Get("native_networkconf_id").(string),
NativeNetworkID: d.Get("native_networkconf_id").(string),

LldpmedEnabled bool `json:"lldpmed_enabled,omitempty"`
LldpmedNotifyEnabled bool `json:"lldpmed_notify_enabled,omitempty"`
MirrorPortIDX int `json:"mirror_port_idx,omitempty"` // [1-9]|[1-4][0-9]|5[0-2]
NATiveNetworkID string `json:"native_networkconf_id,omitempty"`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NATiveNetworkID string `json:"native_networkconf_id,omitempty"`
NativeNetworkID string `json:"native_networkconf_id,omitempty"`

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

Successfully merging this pull request may close these issues.

Shift WLAN passphrase to separate resource
2 participants