Skip to content

ivorsmorenburg/terraform-unifi-controller

Repository files navigation

Requirements

Name Version
unifi >=0.34.0

Providers

Name Version
unifi >=0.34.0

Modules

No modules.

Resources

Name Type
unifi_device.ubn_network_device resource
unifi_firewall_group.fw_group resource
unifi_firewall_rule.rule resource
unifi_network.network_configuration resource
unifi_port_forward.forward resource
unifi_port_profile.profile resource
unifi_user.client resource
unifi_user_group.speed_group resource
unifi_wlan.wlan_configuration resource
unifi_ap_group.default data source
unifi_port_profile.all data source
unifi_port_profile.disabled data source
unifi_radius_profile.default data source
unifi_user_group.default data source

Inputs

Name Description Type Default Required
firewall_groups UniFi Firewall Groups
map(object({
name = string
type = string
members = list(string)
}))
n/a yes
firewall_rules UniFi Firewall Rules
map(object({
name = string
action = string
ruleset = string
rule_index = number
protocol = string
dst_address = optional(string)
dst_firewall_group_ids = optional(list(string))
dst_network_id = optional(string)
dst_network_type = optional(string)
dst_port = optional(string)
icmp_typename = optional(string)
ip_sec = optional(string)
logging = optional(bool)
site = optional(string)
src_address = optional(string)
src_firewall_group_ids = optional(list(string))
src_mac = optional(string)
src_network_id = optional(string)
src_network_type = optional(string)
state_established = optional(bool)
state_invalid = optional(bool)
state_new = optional(bool)
state_related = optional(bool)
}))
n/a yes
network_configuration Controller Networks & vLAN'S
map(object({
network_key = optional(string)

name = string
purpose = string
dhcp_enabled = optional(bool)
dhcp_lease = optional(number)
network_group = optional(string)
ipv6_interface_type = optional(string)
subnet = optional(string)
domain_name = optional(string)
ipv6_pd_interface = optional(string)
wan_egress_qos = optional(number)
vlan_id = optional(number)
dhcp_start = optional(string)
dhcp_stop = optional(string)
dhcp_dns = optional(set(string))
}))
n/a yes
port_forwards UniFi Port fowarding
map(object({
name = string
dst_port = optional(string)
enabled = optional(bool)
fwd_ip = optional(string)
fwd_port = optional(string)
log = optional(bool)
port_forward_interface = optional(string)
protocol = optional(string)
site = optional(string)
src_ip = optional(string)
}))
n/a yes
port_profiles Switch Port Profiles
map(object({

name = string

autoneg = optional(string)
dot1x_ctrl = optional(string)
dot1x_idle_timeout = optional(number)
egress_rate_limit_kbps_enabled = optional(bool)
isolation = optional(string)
native_networkconf_id = optional(string)
lldpmed_enabled = optional(bool)
full_duplex = optional(bool)
op_mode = optional(string)
poe_mode = optional(string)
port_security_enabled = optional(bool)
forward = optional(string)
stormctrl_bcast_enabled = optional(bool)
stormctrl_mcast_enabled = optional(bool)
stormctrl_ucast_enabled = optional(bool)
stp_port_mode = optional(bool)
egress_rate_limit_kbps = optional(number)
lldpmed_notify_enabled = optional(bool)
port_security_mac_address = optional(list(string))
priority_queue1_level = optional(number)
priority_queue2_level = optional(number)
priority_queue3_level = optional(number)
priority_queue4_level = optional(number)
speed = optional(number)
stormctrl_bcast_level = optional(number)
stormctrl_bcast_rate = optional(number)
stormctrl_mcast_level = optional(number)
stormctrl_mcast_rate = optional(number)
stormctrl_ucast_level = optional(number)
stormctrl_ucast_rate = optional(number)
tagged_networkconf_ids = optional(list(string))
}))
n/a yes
ubnt_devices UniFi Devices
map(object({
device = object({
name = string
mac = string
ports_override = optional(map(object({
name = string
port_number = number
port_profile_id = string
})))
})
}))
n/a yes
unifi_credentials Unifi Controller Credentials & Host
object({
username = string
password = string
host = string
insecure = bool
})
n/a yes
unifi_site UniFi Site name and Description and others... map(string) n/a yes
user_speed_groups UniFi Site name and Description and others...
map(object({
name = string
qos_rate_max_down = optional(number)
qos_rate_max_up = optional(number)
}))
n/a yes
wlan_configuration Controller WiFi
map(object({
network_key = optional(string)

ssid = string
security = string
user_group_id = string
passphrase = optional(string)
ap_group_ids = optional(list(string))
hide_ssid = optional(bool)
is_guest = optional(bool)
mac_filter_enabled = optional(bool)
mac_filter_list = optional(list(string))
mac_filter_policy = optional(string)
multicast_enhance = optional(bool)
network_id = optional(string)
no2ghz_oui = bool
radius_profile_id = optional(string)
schedule = optional(string)
site = optional(string)
wlan_band = optional(string)
}))
n/a yes

Outputs

Name Description
default_user_speed_group Default Speed WiFi Group
firewall_groups Map of UniFi FW Groups firewall_groups['key']
firewall_rules Map of UniFi FW Groups firewall_groups['key']
fowarding_ports Fowarding ports port_fowards['key']
port_profiles Map of UniFi SW Profiles
speed_groups Map of UniFi Networks network_configuration['key']
unifi_all_port_profile Default All Networks profile
unifi_ap_group_default AP Default Group
unifi_disabled_port_profile Look-Up the built-in disabled port profile
unifi_networks Map of UniFi Networks network_configuration['key']