Docs updates, more examples, some tool updates
Change docs dirs based on registry expectations
This commit is contained in:
10
examples/resources/unifi_firewall_group/resource.tf
Normal file
10
examples/resources/unifi_firewall_group/resource.tf
Normal file
@@ -0,0 +1,10 @@
|
||||
variable "laptop_ips" {
|
||||
type = list(string)
|
||||
}
|
||||
|
||||
resource "unifi_firewall_group" "can_print" {
|
||||
name = "can-print"
|
||||
type = "address-group"
|
||||
|
||||
members = var.laptop_ips
|
||||
}
|
||||
15
examples/resources/unifi_firewall_rule/resource.tf
Normal file
15
examples/resources/unifi_firewall_rule/resource.tf
Normal file
@@ -0,0 +1,15 @@
|
||||
variable "ip_address" {
|
||||
type = string
|
||||
}
|
||||
|
||||
resource "unifi_firewall_rule" "drop_all" {
|
||||
name = "drop all"
|
||||
action = "drop"
|
||||
ruleset = "LAN_IN"
|
||||
|
||||
rule_index = 2011
|
||||
|
||||
protocol = "all"
|
||||
|
||||
dst_address = var.ip_address
|
||||
}
|
||||
@@ -9,9 +9,7 @@ import (
|
||||
|
||||
func dataRADIUSProfile() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: `
|
||||
unifi_radius_profile data source can be used to retrieve the ID for a RADIUS profile by name.
|
||||
`,
|
||||
Description: "`unifi_radius_profile` data source can be used to retrieve the ID for a RADIUS profile by name.",
|
||||
|
||||
Read: dataRADIUSProfileRead,
|
||||
|
||||
|
||||
@@ -9,9 +9,7 @@ import (
|
||||
|
||||
func dataUserGroup() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: `
|
||||
unifi_user_group data source can be used to retrieve the ID for a user group by name.
|
||||
`,
|
||||
Description: "`unifi_user_group` data source can be used to retrieve the ID for a user group by name.",
|
||||
|
||||
Read: dataUserGroupRead,
|
||||
|
||||
|
||||
@@ -9,9 +9,7 @@ import (
|
||||
|
||||
func dataWLANGroup() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: `
|
||||
unifi_wlan_group data source can be used to retrieve the ID for a WLAN group by name.
|
||||
`,
|
||||
Description: "`unifi_wlan_group` data source can be used to retrieve the ID for a WLAN group by name.",
|
||||
|
||||
Read: dataWLANGroupRead,
|
||||
|
||||
|
||||
@@ -10,9 +10,8 @@ import (
|
||||
|
||||
func resourceFirewallGroup() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: `
|
||||
unifi_firewall_group manages groups of addresses or ports for use in firewall rules (unifi_firewall_rule).
|
||||
`,
|
||||
Description: "`unifi_firewall_group` manages groups of addresses or ports for use in firewall rules (`unifi_firewall_rule`).",
|
||||
|
||||
Create: resourceFirewallGroupCreate,
|
||||
Read: resourceFirewallGroupRead,
|
||||
Update: resourceFirewallGroupUpdate,
|
||||
|
||||
@@ -13,9 +13,8 @@ var firewallRuleProtocolRegexp = regexp.MustCompile("^$|all|([0-9]|[1-9][0-9]|1[
|
||||
|
||||
func resourceFirewallRule() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: `
|
||||
unifi_firewall_rule manages an individual firewall rule on the gateway.
|
||||
`,
|
||||
Description: "`unifi_firewall_rule` manages an individual firewall rule on the gateway.",
|
||||
|
||||
Create: resourceFirewallRuleCreate,
|
||||
Read: resourceFirewallRuleRead,
|
||||
Update: resourceFirewallRuleUpdate,
|
||||
|
||||
@@ -11,9 +11,7 @@ import (
|
||||
|
||||
func resourceNetwork() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: `
|
||||
unifi_network manages LAN/VLAN networks.
|
||||
`,
|
||||
Description: "`unifi_network` manages LAN/VLAN networks.",
|
||||
|
||||
Create: resourceNetworkCreate,
|
||||
Read: resourceNetworkRead,
|
||||
|
||||
@@ -10,9 +10,7 @@ import (
|
||||
|
||||
func resourcePortForward() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: `
|
||||
unifi_port_forward manages a port forwarding rule on the gateway.
|
||||
`,
|
||||
Description: "`unifi_port_forward` manages a port forwarding rule on the gateway.",
|
||||
|
||||
Create: resourcePortForwardCreate,
|
||||
Read: resourcePortForwardRead,
|
||||
|
||||
@@ -10,13 +10,10 @@ import (
|
||||
|
||||
func resourceUser() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: `
|
||||
unifi_user manages a user (or "client" in the UI) of the network, these are identified
|
||||
by unique MAC addresses.
|
||||
|
||||
Users are "created" in the controller when observed on the network, so the resource defaults to allowing
|
||||
itself to just take over management of a MAC address, but this can be turned off.
|
||||
`,
|
||||
Description: "`unifi_user` manages a user (or \"client\" in the UI) of the network, these are identified " +
|
||||
"by unique MAC addresses.\n\n" +
|
||||
"Users are created in the controller when observed on the network, so the resource defaults to allowing " +
|
||||
"itself to just take over management of a MAC address, but this can be turned off.",
|
||||
|
||||
Create: resourceUserCreate,
|
||||
Read: resourceUserRead,
|
||||
|
||||
@@ -9,10 +9,8 @@ import (
|
||||
|
||||
func resourceUserGroup() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: `
|
||||
unifi_user_group manages a user group (called "client group" in the UI), which can be used
|
||||
to limit bandwidth for groups of users.
|
||||
`,
|
||||
Description: "`unifi_user_group` manages a user group (called \"client group\" in the UI), which can be used " +
|
||||
"to limit bandwidth for groups of users.",
|
||||
|
||||
Create: resourceUserGroupCreate,
|
||||
Read: resourceUserGroupRead,
|
||||
|
||||
@@ -13,9 +13,8 @@ import (
|
||||
|
||||
func resourceWLAN() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: `
|
||||
unifi_wlan manages a WiFi network / SSID.
|
||||
`,
|
||||
Description: "`unifi_wlan` manages a WiFi network / SSID.",
|
||||
|
||||
Create: resourceWLANCreate,
|
||||
Read: resourceWLANRead,
|
||||
Update: resourceWLANUpdate,
|
||||
|
||||
@@ -8,7 +8,7 @@ description: |-
|
||||
|
||||
# Resource: `unifi_radius_profile`
|
||||
|
||||
unifi_radius_profile data source can be used to retrieve the ID for a RADIUS profile by name.
|
||||
`unifi_radius_profile` data source can be used to retrieve the ID for a RADIUS profile by name.
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ description: |-
|
||||
|
||||
# Resource: `unifi_user_group`
|
||||
|
||||
unifi_user_group data source can be used to retrieve the ID for a user group by name.
|
||||
`unifi_user_group` data source can be used to retrieve the ID for a user group by name.
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ description: |-
|
||||
|
||||
# Resource: `unifi_wlan_group`
|
||||
|
||||
unifi_wlan_group data source can be used to retrieve the ID for a WLAN group by name.
|
||||
`unifi_wlan_group` data source can be used to retrieve the ID for a WLAN group by name.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -8,9 +8,22 @@ description: |-
|
||||
|
||||
# Resource: `unifi_firewall_group`
|
||||
|
||||
unifi_firewall_group manages groups of addresses or ports for use in firewall rules (unifi_firewall_rule).
|
||||
`unifi_firewall_group` manages groups of addresses or ports for use in firewall rules (`unifi_firewall_rule`).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
variable "laptop_ips" {
|
||||
type = list(string)
|
||||
}
|
||||
|
||||
resource "unifi_firewall_group" "can_print" {
|
||||
name = "can-print"
|
||||
type = "address-group"
|
||||
|
||||
members = var.laptop_ips
|
||||
}
|
||||
```
|
||||
|
||||
## Schema
|
||||
|
||||
@@ -8,9 +8,27 @@ description: |-
|
||||
|
||||
# Resource: `unifi_firewall_rule`
|
||||
|
||||
unifi_firewall_rule manages an individual firewall rule on the gateway.
|
||||
`unifi_firewall_rule` manages an individual firewall rule on the gateway.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
variable "ip_address" {
|
||||
type = string
|
||||
}
|
||||
|
||||
resource "unifi_firewall_rule" "drop_all" {
|
||||
name = "drop all"
|
||||
action = "drop"
|
||||
ruleset = "LAN_IN"
|
||||
|
||||
rule_index = 2011
|
||||
|
||||
protocol = "all"
|
||||
|
||||
dst_address = var.ip_address
|
||||
}
|
||||
```
|
||||
|
||||
## Schema
|
||||
|
||||
@@ -8,7 +8,7 @@ description: |-
|
||||
|
||||
# Resource: `unifi_network`
|
||||
|
||||
unifi_network manages LAN/VLAN networks.
|
||||
`unifi_network` manages LAN/VLAN networks.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -8,7 +8,7 @@ description: |-
|
||||
|
||||
# Resource: `unifi_port_forward`
|
||||
|
||||
unifi_port_forward manages a port forwarding rule on the gateway.
|
||||
`unifi_port_forward` manages a port forwarding rule on the gateway.
|
||||
|
||||
|
||||
|
||||
@@ -3,20 +3,15 @@ subcategory: ""
|
||||
layout: ""
|
||||
page_title: "terraform-provider-unifi: unifi_user"
|
||||
description: |-
|
||||
unifi_user manages a user (or "client" in the UI) of the network, these are identified
|
||||
by unique MAC addresses.
|
||||
|
||||
Users are "created" in the controller when observed on the network, so the resource defaults to allowing
|
||||
itself to just take over management of a MAC address, but this can be turned off.
|
||||
unifi_user manages a user (or "client" in the UI) of the network, these are identified by unique MAC addresses.
|
||||
Users are created in the controller when observed on the network, so the resource defaults to allowing itself to just take over management of a MAC address, but this can be turned off.
|
||||
---
|
||||
|
||||
# Resource: `unifi_user`
|
||||
|
||||
unifi_user manages a user (or "client" in the UI) of the network, these are identified
|
||||
by unique MAC addresses.
|
||||
`unifi_user` manages a user (or "client" in the UI) of the network, these are identified by unique MAC addresses.
|
||||
|
||||
Users are "created" in the controller when observed on the network, so the resource defaults to allowing
|
||||
itself to just take over management of a MAC address, but this can be turned off.
|
||||
Users are created in the controller when observed on the network, so the resource defaults to allowing itself to just take over management of a MAC address, but this can be turned off.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -3,14 +3,12 @@ subcategory: ""
|
||||
layout: ""
|
||||
page_title: "terraform-provider-unifi: unifi_user_group"
|
||||
description: |-
|
||||
unifi_user_group manages a user group (called "client group" in the UI), which can be used
|
||||
to limit bandwidth for groups of users.
|
||||
unifi_user_group manages a user group (called "client group" in the UI), which can be used to limit bandwidth for groups of users.
|
||||
---
|
||||
|
||||
# Resource: `unifi_user_group`
|
||||
|
||||
unifi_user_group manages a user group (called "client group" in the UI), which can be used
|
||||
to limit bandwidth for groups of users.
|
||||
`unifi_user_group` manages a user group (called "client group" in the UI), which can be used to limit bandwidth for groups of users.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -8,7 +8,7 @@ description: |-
|
||||
|
||||
# Resource: `unifi_wlan`
|
||||
|
||||
unifi_wlan manages a WiFi network / SSID.
|
||||
`unifi_wlan` manages a WiFi network / SSID.
|
||||
|
||||
## Example Usage
|
||||
|
||||
Reference in New Issue
Block a user