From e383539b1fce95acf1287b8e454909a29e4fbdc9 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 19 May 2024 19:08:57 +0200 Subject: unifi-controller: Misc cleanup Switching back to standard port 8080. Using version for image. --- terraform/unifi-controller/main.tf | 9 +++------ terraform/unifi-controller/unifi.tf | 26 +++++++++++++++----------- 2 files changed, 18 insertions(+), 17 deletions(-) (limited to 'terraform/unifi-controller') diff --git a/terraform/unifi-controller/main.tf b/terraform/unifi-controller/main.tf index 3bf81ae..e0df9bb 100644 --- a/terraform/unifi-controller/main.tf +++ b/terraform/unifi-controller/main.tf @@ -23,10 +23,7 @@ provider "docker" { locals { domain_name = "unifi.vpn.trygvis.io" -} -# variable "foo" {} -# -# output "bar" { -# value = var.foo.value -# } + # docker_image = "lscr.io/linuxserver/unifi-controller:8.0.24" + docker_image = "lscr.io/linuxserver/unifi-controller:7.5.187" +} diff --git a/terraform/unifi-controller/unifi.tf b/terraform/unifi-controller/unifi.tf index fc10542..76f6448 100644 --- a/terraform/unifi-controller/unifi.tf +++ b/terraform/unifi-controller/unifi.tf @@ -3,7 +3,7 @@ data "docker_network" "traefik" { } data "docker_registry_image" "unifi-controller" { - name = "lscr.io/linuxserver/unifi-controller:latest" + name = local.docker_image } resource "docker_image" "unifi-controller" { @@ -28,17 +28,21 @@ resource "docker_container" "unifi-controller" { dynamic "ports" { for_each = [ - { port = 161, proto = "udp" }, - { port = 3478, proto = "udp" }, - { port = 6789, proto = "tcp" }, - { port = 8081, proto = "tcp" }, -# { port = 8080, proto = "tcp" }, # not used, we have configured it to 9080 - { port = 9080, proto = "tcp" }, - { port = 8880, proto = "tcp" }, -# { port = 8443, proto = "tcp" }, - { port = 10001, proto = "udp" }, + # Taken from https://fleet.linuxserver.io/image?name=linuxserver/unifi-controller + { port = 1900, proto = "udp" }, # Required for Make controller discoverable on L2 network option + { port = 3478, proto = "udp" }, # Unifi STUN port + { port = 5514, proto = "tcp" }, # Remote syslog port + { port = 6789, proto = "tcp" }, # For mobile throughput test + { port = 8080, proto = "tcp" }, # Required for device communication - # { port = 8843, proto = "tcp" }, web ui + # Public HTTP is handled by traefik + # { port = 8443, proto = "tcp" }, # Unifi web admin port + + # Not used + # { port = 8843, proto = "tcp" }, # Unifi guest portal HTTPS redirect port + # { port = 8880, proto = "tcp" }, # Unifi guest portal HTTP redirect port + + { port = 10001, proto = "udp" }, # Required for AP discovery ] content { internal = ports.value["port"] -- cgit v1.2.3