diff --git a/docs/resources/device.md b/docs/resources/device.md index 582c90b..a817a5c 100644 --- a/docs/resources/device.md +++ b/docs/resources/device.md @@ -59,6 +59,8 @@ resource "unifi_device" "us_24_poe" { ### Optional +- `allow_adoption` (Boolean) Specifies whether this resource should tell the controller to adopt the device on create. Defaults to `false`. +- `forget_on_destroy` (Boolean) Specifies whether this resource should tell the controller to forget the device on destroy. Defaults to `true`. - `mac` (String) The MAC address of the device. This can be specified so that the provider can take control of a device (since devices are created through adoption). - `name` (String) The name of the device. - `port_override` (Block Set) Settings overrides for specific switch ports. (see [below for nested schema](#nestedblock--port_override)) diff --git a/docs/resources/firewall_rule.md b/docs/resources/firewall_rule.md index 457bbe8..42e0f9c 100644 --- a/docs/resources/firewall_rule.md +++ b/docs/resources/firewall_rule.md @@ -61,6 +61,7 @@ resource "unifi_firewall_rule" "drop_all" { - `src_mac` (String) The source MAC address of the firewall rule. - `src_network_id` (String) The source network ID for the firewall rule. - `src_network_type` (String) The source network type of the firewall rule. Can be one of `ADDRv4` or `NETv4`. Defaults to `NETv4`. +- `src_port` (String) The source port of the firewall rule. - `state_established` (Boolean) Match where the state is established. - `state_invalid` (Boolean) Match where the state is invalid. - `state_new` (Boolean) Match where the state is new. diff --git a/docs/resources/wlan.md b/docs/resources/wlan.md index 1e21319..437fe13 100644 --- a/docs/resources/wlan.md +++ b/docs/resources/wlan.md @@ -79,7 +79,7 @@ resource "unifi_wlan" "wifi" { - `schedule` (Block List) Start and stop schedules for the WLAN (see [below for nested schema](#nestedblock--schedule)) - `site` (String) The name of the site to associate the wlan with. - `uapsd` (Boolean) Enable Unscheduled Automatic Power Save Delivery Defaults to `false`. -- `wlan_band` (String) Radio band your WiFi network will use. +- `wlan_band` (String) Radio band your WiFi network will use. Defaults to `both`. - `wpa3_support` (Boolean) Enable WPA 3 support (security must be `wpapsk` and PMF must be turned on). - `wpa3_transition` (Boolean) Enable WPA 3 and WPA 2 support (security must be `wpapsk` and `wpa3_support` must be true). diff --git a/internal/provider/resource_network_test.go b/internal/provider/resource_network_test.go index df816be..1b9094a 100644 --- a/internal/provider/resource_network_test.go +++ b/internal/provider/resource_network_test.go @@ -405,7 +405,7 @@ func TestAccNetwork_vlanOnly(t *testing.T) { func TestAccNetwork_mdns(t *testing.T) { name := acctest.RandomWithPrefix("tfacc") - vlanID := getTestVLAN(t) + subnet, vlan := getTestVLAN(t) resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { @@ -416,14 +416,14 @@ func TestAccNetwork_mdns(t *testing.T) { // TODO: CheckDestroy: , Steps: []resource.TestStep{ { - Config: testAccNetworkConfigMDNS(name, vlanID, true), + Config: testAccNetworkConfigMDNS(name, subnet, vlan, true), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("unifi_network.test", "multicast_dns", "true"), ), }, importStep("unifi_network.test"), { - Config: testAccNetworkConfigMDNS(name, vlanID, false), + Config: testAccNetworkConfigMDNS(name, subnet, vlan, false), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("unifi_network.test", "multicast_dns", "false"), ), @@ -679,15 +679,15 @@ resource "unifi_network" "test" { `, name, subnet, vlan, gatewayIP, dhcpdV6Start, dhcpdV6Stop, strings.Join(quoteStrings(dhcpV6DNS), ",")) } -func testAccNetworkConfigMDNS(name string, vlan int, mdns bool) string { +func testAccNetworkConfigMDNS(name string, subnet *net.IPNet, vlan int, mdns bool) string { return fmt.Sprintf(` resource "unifi_network" "test" { name = "%[1]s" purpose = "corporate" - subnet = cidrsubnet("10.0.0.0/8", 6, %[2]d) - vlan_id = %[2]d + subnet = "%[2]s" + vlan_id = %[3]d - multicast_dns = %[3]t + multicast_dns = %[4]t } -`, name, vlan, mdns) +`, name, subnet, vlan, mdns) }