From 485148048209ae47c1dbf0f4df6f9586335561c4 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 1 Jan 2025 18:56:29 +0100 Subject: zigbee2mqtt --- terraform/lhn2pi-zigbee2mqtt/main.tf | 1 + terraform/lhn2pi-zigbee2mqtt/zigbee2mqtt.tf | 3 +++ 2 files changed, 4 insertions(+) (limited to 'terraform/lhn2pi-zigbee2mqtt') diff --git a/terraform/lhn2pi-zigbee2mqtt/main.tf b/terraform/lhn2pi-zigbee2mqtt/main.tf index 009ac7d..4182db8 100644 --- a/terraform/lhn2pi-zigbee2mqtt/main.tf +++ b/terraform/lhn2pi-zigbee2mqtt/main.tf @@ -25,6 +25,7 @@ provider "docker" { locals { docker_image = "koenkk/zigbee2mqtt:1.42.0" + public_ip = module.ipam.hosts.lhn2-z2m.address } module "ipam" { diff --git a/terraform/lhn2pi-zigbee2mqtt/zigbee2mqtt.tf b/terraform/lhn2pi-zigbee2mqtt/zigbee2mqtt.tf index a77fe95..1e3e1a9 100644 --- a/terraform/lhn2pi-zigbee2mqtt/zigbee2mqtt.tf +++ b/terraform/lhn2pi-zigbee2mqtt/zigbee2mqtt.tf @@ -18,10 +18,13 @@ resource "docker_container" "zigbee2mqtt" { # privileged = true must_run = true + network_mode = "host" + ports { internal = 8080 external = 8080 protocol = "tcp" + ip = local.public_ip } volumes { -- cgit v1.2.3