From 8aed3a877e4ecaa220db63f7fe34da42145b5b97 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Tue, 6 Sep 2022 17:15:43 -0700 Subject: [PATCH] Add homeassistant external --- nomad/services.tf | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/nomad/services.tf b/nomad/services.tf index e2f53d2..6f51e7a 100644 --- a/nomad/services.tf +++ b/nomad/services.tf @@ -53,3 +53,33 @@ module "sonarr" { ]) } } + +resource "consul_service" "homeassistant" { + name = "hass" + node = consul_node.homeassistant.name + port = 8123 + tags = [ + "traefik.enable=true", + "traefik.consulcatalog.connect=false", + "traefik.http.routers.hass.entryPoints=websecure", + ] + + check { + check_id = "homeassistant:hass" + status = "passing" + name = "Home Assistant Health Check" + http = "192.168.3.65:8123" + interval = "30s" + timeout = "10s" + } +} + +resource "consul_node" "homeassistant" { + name = "homeassistant" + address = "192.168.3.65" + + meta = { + "external-node" = "true" + "external-probe" = "true" + } +}