4.5 KiB
4.5 KiB
page_title, subcategory, description
| page_title | subcategory | description |
|---|---|---|
| unifi_wlan Resource - terraform-provider-unifi | unifi_wlan manages a WiFi network / SSID. |
unifi_wlan (Resource)
unifi_wlan manages a WiFi network / SSID.
Example Usage
variable "vlan_id" {
default = 10
}
data "unifi_ap_group" "default" {
}
data "unifi_user_group" "default" {
}
resource "unifi_network" "vlan" {
name = "wifi-vlan"
purpose = "corporate"
subnet = "10.0.0.1/24"
vlan_id = var.vlan_id
dhcp_start = "10.0.0.6"
dhcp_stop = "10.0.0.254"
dhcp_enabled = true
}
resource "unifi_wlan" "wifi" {
name = "myssid"
passphrase = "12345678"
security = "wpapsk"
# enable WPA2/WPA3 support
wpa3_support = true
wpa3_transition = true
pmf_mode = "optional"
network_id = unifi_network.vlan.id
ap_group_ids = [data.unifi_ap_group.default.id]
user_group_id = data.unifi_user_group.default.id
}
Schema
Required
name(String) The SSID of the network.security(String) The type of WiFi security for this network. Valid values are:wpapsk,wpaeap, andopen.user_group_id(String) ID of the user group to use for this network.
Optional
ap_group_ids(Set of String) IDs of the AP groups to use for this network.hide_ssid(Boolean) Indicates whether or not to hide the SSID from broadcast.is_guest(Boolean) Indicates that this is a guest WLAN and should use guest behaviors.l2_isolation(Boolean) Isolates stations on layer 2 (ethernet) level Defaults tofalse.mac_filter_enabled(Boolean) Indicates whether or not the MAC filter is turned of for the network.mac_filter_list(Set of String) List of MAC addresses to filter (only valid ifmac_filter_enabledistrue).mac_filter_policy(String) MAC address filter policy (only valid ifmac_filter_enabledistrue). Defaults todeny.minimum_data_rate_2g_kbps(Number) Set minimum data rate control for 2G devices, in Kbps. Use0to disable minimum data rates. Valid values are:1000,2000,5500,6000,9000,11000,12000,18000,24000,36000,48000, and54000.minimum_data_rate_5g_kbps(Number) Set minimum data rate control for 5G devices, in Kbps. Use0to disable minimum data rates. Valid values are:6000,9000,12000,18000,24000,36000,48000, and54000.multicast_enhance(Boolean) Indicates whether or not Multicast Enhance is turned of for the network.network_id(String) ID of the network for this SSIDno2ghz_oui(Boolean) Connect high performance clients to 5 GHz only Defaults totrue.passphrase(String, Sensitive) The passphrase for the network, this is only required ifsecurityis not set toopen.pmf_mode(String) Enable Protected Management Frames. This cannot be disabled if using WPA 3. Valid values arerequired,optionalanddisabled. Defaults todisabled.radius_profile_id(String) ID of the RADIUS profile to use when securitywpaeap. You can query this via theunifi_radius_profiledata source.schedule(Block List) Start and stop schedules for the WLAN (see below for nested schema)site(String) The name of the site to associate the wlan with.uapsd(Boolean) Enable Unscheduled Automatic Power Save Delivery Defaults tofalse.wlan_band(String) Radio band your WiFi network will use. Defaults toboth.wpa3_support(Boolean) Enable WPA 3 support (security must bewpapskand PMF must be turned on).wpa3_transition(Boolean) Enable WPA 3 and WPA 2 support (security must bewpapskandwpa3_supportmust be true).
Read-Only
id(String) The ID of the network.
Nested Schema for schedule
Required:
day_of_week(String) Day of week for the block. Valid values aresun,mon,tue,wed,thu,fri,sat.duration(Number) Length of the block in minutes.start_hour(Number) Start hour for the block (0-23).
Optional:
name(String) Name of the block.start_minute(Number) Start minute for the block (0-59). Defaults to0.
Import
Import is supported using the following syntax:
# import from provider configured site
terraform import unifi_wlan.mywlan 5dc28e5e9106d105bdc87217
# import from another site
terraform import unifi_wlan.mywlan bfa2l6i7:5dc28e5e9106d105bdc87217