Skip to content

Commit

Permalink
Updates for controller v7.1 and dependency updates
Browse files Browse the repository at this point in the history
  • Loading branch information
paultyng committed Jul 3, 2022
1 parent aeb3678 commit e7a037e
Show file tree
Hide file tree
Showing 29 changed files with 427 additions and 381 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/acctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ jobs:
- "v7"
- "latest"
terraform_version:
- "0.15.5"
- "1.0.11"
- "1.1.9"
- "1.2.4"
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.16"
go-version: "1.18"

- name: Check out code into the Go module directory
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "v*"

env:
GO_VERSION: "1.16"
GO_VERSION: "1.18"

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.16"
go-version: "1.18"
- name: Import GPG key
id: import_gpg
uses: paultyng/ghaction-import-gpg@v2.1.0
Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/ap_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ data "unifi_ap_group" "default" {

### Optional

- **name** (String) The name of the AP group to look up, leave blank to look up the default AP group.
- **site** (String) The name of the site the AP group is associated with.
- `name` (String) The name of the AP group to look up, leave blank to look up the default AP group.
- `site` (String) The name of the site the AP group is associated with.

### Read-Only

- **id** (String) The ID of this AP group.
- `id` (String) The ID of this AP group.


64 changes: 32 additions & 32 deletions docs/data-sources/network.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description: |-
```terraform
#retrieve network data by unifi network name
data "unifi_network" "lan_network" {
name = "LAN"
name = "Default"
}
#retrieve network data from user record
Expand All @@ -32,39 +32,39 @@ data "unifi_network" "my_network" {

### Optional

- **id** (String) The ID of the network.
- **name** (String) The name of the network.
- **site** (String) The name of the site to associate the network with.
- `id` (String) The ID of the network.
- `name` (String) The name of the network.
- `site` (String) The name of the site to associate the network with.

### Read-Only

- **dhcp_dns** (List of String) IPv4 addresses for the DNS server to be returned from the DHCP server.
- **dhcp_enabled** (Boolean) whether DHCP is enabled or not on this network.
- **dhcp_lease** (Number) lease time for DHCP addresses.
- **dhcp_start** (String) The IPv4 address where the DHCP range of addresses starts.
- **dhcp_stop** (String) The IPv4 address where the DHCP range of addresses stops.
- **dhcpd_boot_enabled** (Boolean) Toggles on the DHCP boot options. will be set to true if you have dhcpd_boot_filename, and dhcpd_boot_server set.
- **dhcpd_boot_filename** (String) the file to PXE boot from on the dhcpd_boot_server.
- **dhcpd_boot_server** (String) IPv4 address of a TFTP server to network boot from.
- **domain_name** (String) The domain name of this network.
- **igmp_snooping** (Boolean) Specifies whether IGMP snooping is enabled or not.
- **ipv6_interface_type** (String) Specifies which type of IPv6 connection to use.
- **ipv6_pd_interface** (String) Specifies which WAN interface is used for IPv6 Prefix Delegation.
- **ipv6_pd_prefixid** (String) Specifies the IPv6 Prefix ID.
- **ipv6_ra_enable** (Boolean) Specifies whether to enable router advertisements or not.
- **ipv6_static_subnet** (String) Specifies the static IPv6 subnet (when ipv6_interface_type is 'static').
- **network_group** (String) The group of the network.
- **purpose** (String) The purpose of the network. One of `corporate`, `guest`, `wan`, or `vlan-only`.
- **subnet** (String) The subnet of the network (CIDR address).
- **vlan_id** (Number) The VLAN ID of the network.
- **wan_dns** (List of String) DNS servers IPs of the WAN.
- **wan_egress_qos** (Number) Specifies the WAN egress quality of service.
- **wan_gateway** (String) The IPv4 gateway of the WAN.
- **wan_ip** (String) The IPv4 address of the WAN.
- **wan_netmask** (String) The IPv4 netmask of the WAN.
- **wan_networkgroup** (String) Specifies the WAN network group. One of either `WAN`, `WAN2` or `WAN_LTE_FAILOVER`.
- **wan_type** (String) Specifies the IPV4 WAN connection type. One of either `disabled`, `static`, `dhcp`, or `pppoe`.
- **wan_username** (String) Specifies the IPV4 WAN username.
- **x_wan_password** (String) Specifies the IPV4 WAN password.
- `dhcp_dns` (List of String) IPv4 addresses for the DNS server to be returned from the DHCP server.
- `dhcp_enabled` (Boolean) whether DHCP is enabled or not on this network.
- `dhcp_lease` (Number) lease time for DHCP addresses.
- `dhcp_start` (String) The IPv4 address where the DHCP range of addresses starts.
- `dhcp_stop` (String) The IPv4 address where the DHCP range of addresses stops.
- `dhcpd_boot_enabled` (Boolean) Toggles on the DHCP boot options. will be set to true if you have dhcpd_boot_filename, and dhcpd_boot_server set.
- `dhcpd_boot_filename` (String) the file to PXE boot from on the dhcpd_boot_server.
- `dhcpd_boot_server` (String) IPv4 address of a TFTP server to network boot from.
- `domain_name` (String) The domain name of this network.
- `igmp_snooping` (Boolean) Specifies whether IGMP snooping is enabled or not.
- `ipv6_interface_type` (String) Specifies which type of IPv6 connection to use.
- `ipv6_pd_interface` (String) Specifies which WAN interface is used for IPv6 Prefix Delegation.
- `ipv6_pd_prefixid` (String) Specifies the IPv6 Prefix ID.
- `ipv6_ra_enable` (Boolean) Specifies whether to enable router advertisements or not.
- `ipv6_static_subnet` (String) Specifies the static IPv6 subnet (when ipv6_interface_type is 'static').
- `network_group` (String) The group of the network.
- `purpose` (String) The purpose of the network. One of `corporate`, `guest`, `wan`, or `vlan-only`.
- `subnet` (String) The subnet of the network (CIDR address).
- `vlan_id` (Number) The VLAN ID of the network.
- `wan_dns` (List of String) DNS servers IPs of the WAN.
- `wan_egress_qos` (Number) Specifies the WAN egress quality of service.
- `wan_gateway` (String) The IPv4 gateway of the WAN.
- `wan_ip` (String) The IPv4 address of the WAN.
- `wan_netmask` (String) The IPv4 netmask of the WAN.
- `wan_networkgroup` (String) Specifies the WAN network group. One of either `WAN`, `WAN2` or `WAN_LTE_FAILOVER`.
- `wan_type` (String) Specifies the IPV4 WAN connection type. One of either `disabled`, `static`, `dhcp`, or `pppoe`.
- `wan_username` (String) Specifies the IPV4 WAN username.
- `x_wan_password` (String) Specifies the IPV4 WAN password.


6 changes: 3 additions & 3 deletions docs/data-sources/port_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ data "unifi_port_profile" "all" {

### Optional

- **name** (String) The name of the port profile to look up. Defaults to `All`.
- **site** (String) The name of the site the port profile is associated with.
- `name` (String) The name of the port profile to look up. Defaults to `All`.
- `site` (String) The name of the site the port profile is associated with.

### Read-Only

- **id** (String) The ID of this port profile.
- `id` (String) The ID of this port profile.


6 changes: 3 additions & 3 deletions docs/data-sources/radius_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ description: |-

### Optional

- **name** (String) The name of the RADIUS profile to look up. Defaults to `Default`.
- **site** (String) The name of the site the radius profile is associated with.
- `name` (String) The name of the RADIUS profile to look up. Defaults to `Default`.
- `site` (String) The name of the site the radius profile is associated with.

### Read-Only

- **id** (String) The ID of this AP group.
- `id` (String) The ID of this AP group.


24 changes: 12 additions & 12 deletions docs/data-sources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ data "unifi_user" "client" {

### Required

- **mac** (String) The MAC address of the user.
- `mac` (String) The MAC address of the user.

### Optional

- **site** (String) The name of the site the user is associated with.
- `site` (String) The name of the site the user is associated with.

### Read-Only

- **blocked** (Boolean) Specifies whether this user should be blocked from the network.
- **dev_id_override** (Number) Override the device fingerprint.
- **fixed_ip** (String) fixed IPv4 address set for this user.
- **hostname** (String) The hostname of the user.
- **id** (String) The ID of the user.
- **ip** (String) The IP address of the user.
- **name** (String) The name of the user.
- **network_id** (String) The network ID for this user.
- **note** (String) A note with additional information for the user.
- **user_group_id** (String) The user group ID for the user.
- `blocked` (Boolean) Specifies whether this user should be blocked from the network.
- `dev_id_override` (Number) Override the device fingerprint.
- `fixed_ip` (String) fixed IPv4 address set for this user.
- `hostname` (String) The hostname of the user.
- `id` (String) The ID of the user.
- `ip` (String) The IP address of the user.
- `name` (String) The name of the user.
- `network_id` (String) The network ID for this user.
- `note` (String) A note with additional information for the user.
- `user_group_id` (String) The user group ID for the user.


10 changes: 5 additions & 5 deletions docs/data-sources/user_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ description: |-

### Optional

- **name** (String) The name of the user group to look up. Defaults to `Default`.
- **site** (String) The name of the site the user group is associated with.
- `name` (String) The name of the user group to look up. Defaults to `Default`.
- `site` (String) The name of the site the user group is associated with.

### Read-Only

- **id** (String) The ID of this AP group.
- **qos_rate_max_down** (Number)
- **qos_rate_max_up** (Number)
- `id` (String) The ID of this AP group.
- `qos_rate_max_down` (Number)
- `qos_rate_max_up` (Number)


10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ provider "unifi" {

### Optional

- **allow_insecure** (Boolean) Skip verification of TLS certificates of API requests. You may need to set this to `true` if you are using your local API without setting up a signed certificate. Can be specified with the `UNIFI_INSECURE` environment variable.
- **api_url** (String) URL of the controller API. Can be specified with the `UNIFI_API` environment variable. You should **NOT** supply the path (`/api`), the SDK will discover the appropriate paths. This is to support UDM Pro style API paths as well as more standard controller paths.
- **password** (String) Password for the user accessing the API. Can be specified with the `UNIFI_PASSWORD` environment variable.
- **site** (String) The site in the Unifi controller this provider will manage. Can be specified with the `UNIFI_SITE` environment variable. Default: `default`
- **username** (String) Local user name for the Unifi controller API. Can be specified with the `UNIFI_USERNAME` environment variable.
- `allow_insecure` (Boolean) Skip verification of TLS certificates of API requests. You may need to set this to `true` if you are using your local API without setting up a signed certificate. Can be specified with the `UNIFI_INSECURE` environment variable.
- `api_url` (String) URL of the controller API. Can be specified with the `UNIFI_API` environment variable. You should **NOT** supply the path (`/api`), the SDK will discover the appropriate paths. This is to support UDM Pro style API paths as well as more standard controller paths.
- `password` (String) Password for the user accessing the API. Can be specified with the `UNIFI_PASSWORD` environment variable.
- `site` (String) The site in the Unifi controller this provider will manage. Can be specified with the `UNIFI_SITE` environment variable. Default: `default`
- `username` (String) Local user name for the Unifi controller API. Can be specified with the `UNIFI_USERNAME` environment variable.
18 changes: 9 additions & 9 deletions docs/resources/device.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,26 @@ resource "unifi_device" "us_24_poe" {

### Optional

- **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))
- **site** (String) The name of the site to associate the device with.
- `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))
- `site` (String) The name of the site to associate the device with.

### Read-Only

- **disabled** (Boolean) Specifies whether this device should be disabled.
- **id** (String) The ID of the device.
- `disabled` (Boolean) Specifies whether this device should be disabled.
- `id` (String) The ID of the device.

<a id="nestedblock--port_override"></a>
### Nested Schema for `port_override`

Required:

- **number** (Number) Switch port number.
- `number` (Number) Switch port number.

Optional:

- **name** (String) Human-readable name of the port.
- **port_profile_id** (String) ID of the Port Profile used on this port.
- `name` (String) Human-readable name of the port.
- `port_profile_id` (String) ID of the Port Profile used on this port.


16 changes: 8 additions & 8 deletions docs/resources/dynamic_dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ resource "unifi_dynamic_dns" "test" {

### Required

- **host_name** (String) The host name to update in the dynamic DNS service.
- **service** (String) The Dynamic DNS service provider, various values are supported (for example `dyndns`, etc.).
- `host_name` (String) The host name to update in the dynamic DNS service.
- `service` (String) The Dynamic DNS service provider, various values are supported (for example `dyndns`, etc.).

### Optional

- **interface** (String) The interface for the dynamic DNS. Can be `wan` or `wan2`. Defaults to `wan`.
- **login** (String) The server for the dynamic DNS service.
- **password** (String, Sensitive) The server for the dynamic DNS service.
- **server** (String) The server for the dynamic DNS service.
- **site** (String) The name of the site to associate the dynamic DNS with.
- `interface` (String) The interface for the dynamic DNS. Can be `wan` or `wan2`. Defaults to `wan`.
- `login` (String) The server for the dynamic DNS service.
- `password` (String, Sensitive) The server for the dynamic DNS service.
- `server` (String) The server for the dynamic DNS service.
- `site` (String) The name of the site to associate the dynamic DNS with.

### Read-Only

- **id** (String) The ID of the dynamic DNS.
- `id` (String) The ID of the dynamic DNS.


10 changes: 5 additions & 5 deletions docs/resources/firewall_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ resource "unifi_firewall_group" "can_print" {

### Required

- **members** (Set of String) The members of the firewall group.
- **name** (String) The name of the firewall group.
- **type** (String) The type of the firewall group. Must be one of: `address-group`, `port-group`, or `ipv6-address-group`.
- `members` (Set of String) The members of the firewall group.
- `name` (String) The name of the firewall group.
- `type` (String) The type of the firewall group. Must be one of: `address-group`, `port-group`, or `ipv6-address-group`.

### Optional

- **site** (String) The name of the site to associate the firewall group with.
- `site` (String) The name of the site to associate the firewall group with.

### Read-Only

- **id** (String) The ID of the firewall group.
- `id` (String) The ID of the firewall group.


48 changes: 24 additions & 24 deletions docs/resources/firewall_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,36 @@ resource "unifi_firewall_rule" "drop_all" {

### Required

- **action** (String) The action of the firewall rule. Must be one of `drop`, `accept`, or `reject`.
- **name** (String) The name of the firewall rule.
- **protocol** (String) The protocol of the rule.
- **rule_index** (Number) The index of the rule. Must be >= 2000 < 3000 or >= 4000 < 5000.
- **ruleset** (String) The ruleset for the rule. This is from the perspective of the security gateway. Must be one of `WAN_IN`, `WAN_OUT`, `WAN_LOCAL`, `LAN_IN`, `LAN_OUT`, `LAN_LOCAL`, `GUEST_IN`, `GUEST_OUT`, `GUEST_LOCAL`, `WANv6_IN`, `WANv6_OUT`, `WANv6_LOCAL`, `LANv6_IN`, `LANv6_OUT`, `LANv6_LOCAL`, `GUESTv6_IN`, `GUESTv6_OUT`, or `GUESTv6_LOCAL`.
- `action` (String) The action of the firewall rule. Must be one of `drop`, `accept`, or `reject`.
- `name` (String) The name of the firewall rule.
- `protocol` (String) The protocol of the rule.
- `rule_index` (Number) The index of the rule. Must be >= 2000 < 3000 or >= 4000 < 5000.
- `ruleset` (String) The ruleset for the rule. This is from the perspective of the security gateway. Must be one of `WAN_IN`, `WAN_OUT`, `WAN_LOCAL`, `LAN_IN`, `LAN_OUT`, `LAN_LOCAL`, `GUEST_IN`, `GUEST_OUT`, `GUEST_LOCAL`, `WANv6_IN`, `WANv6_OUT`, `WANv6_LOCAL`, `LANv6_IN`, `LANv6_OUT`, `LANv6_LOCAL`, `GUESTv6_IN`, `GUESTv6_OUT`, or `GUESTv6_LOCAL`.

### Optional

- **dst_address** (String) The destination address of the firewall rule.
- **dst_firewall_group_ids** (Set of String) The destination firewall group IDs of the firewall rule.
- **dst_network_id** (String) The destination network ID of the firewall rule.
- **dst_network_type** (String) The destination network type of the firewall rule. Can be one of `ADDRv4` or `NETv4`. Defaults to `NETv4`.
- **dst_port** (String) The destination port of the firewall rule.
- **icmp_typename** (String) ICMP type name.
- **ip_sec** (String) Specify whether the rule matches on IPsec packets. Can be one of `match-ipset` or `match-none`.
- **logging** (Boolean) Enable logging for the firewall rule.
- **site** (String) The name of the site to associate the firewall rule with.
- **src_address** (String) The source address for the firewall rule.
- **src_firewall_group_ids** (Set of String) The source firewall group IDs for the firewall rule.
- **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`.
- **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.
- **state_related** (Boolean) Match where the state is related.
- `dst_address` (String) The destination address of the firewall rule.
- `dst_firewall_group_ids` (Set of String) The destination firewall group IDs of the firewall rule.
- `dst_network_id` (String) The destination network ID of the firewall rule.
- `dst_network_type` (String) The destination network type of the firewall rule. Can be one of `ADDRv4` or `NETv4`. Defaults to `NETv4`.
- `dst_port` (String) The destination port of the firewall rule.
- `icmp_typename` (String) ICMP type name.
- `ip_sec` (String) Specify whether the rule matches on IPsec packets. Can be one of `match-ipset` or `match-none`.
- `logging` (Boolean) Enable logging for the firewall rule.
- `site` (String) The name of the site to associate the firewall rule with.
- `src_address` (String) The source address for the firewall rule.
- `src_firewall_group_ids` (Set of String) The source firewall group IDs for the firewall rule.
- `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`.
- `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.
- `state_related` (Boolean) Match where the state is related.

### Read-Only

- **id** (String) The ID of the firewall rule.
- `id` (String) The ID of the firewall rule.

## Import

Expand Down
Loading

0 comments on commit e7a037e

Please sign in to comment.