# module "nextcloud" { # source = "./nextcloud" # # depends_on = [module.databases] # } module "backups" { source = "./backups" # In parent module # depends_on = [module.databases] } resource "nomad_job" "whoami" { hcl2 { enabled = true vars = { "count" = 1, # "count" = "${2 * length(data.consul_service.nomad.service)}", } } jobspec = file("${path.module}/whoami.nomad") } resource "nomad_job" "ipdvr" { jobspec = file("${path.module}/ip-dvr.nomad") } # resource "consul_config_entry" "sabnzbd_intents" { # depends_on = [nomad_job.ipdvr] # # name = "sabnzbd" # kind = "service-intentions" # # config_json = jsonencode({ # Sources = [ # { # Action = "allow" # Name = "sonarr" # Precedence = 9 # Type = "consul" # }, # ] # }) # } # # resource "consul_config_entry" "nzbget_intents" { # depends_on = [nomad_job.ipdvr] # # name = "nzbget" # kind = "service-intentions" # # config_json = jsonencode({ # Sources = [ # { # Action = "allow" # Name = "sonarr" # Precedence = 9 # Type = "consul" # }, # ] # }) # } module "media-library" { source = "./service" name = "media-library" image = "caddy" args = ["caddy", "file-server", "--root", "/mnt/media", "--browse"] ingress = true service_port = 80 host_volumes = [ { name = "media-read" dest = "/mnt/media" read_only = true }, ] } module "minitor" { source = "./service" name = "minitor" image = "iamthefij/minitor-go:1.1" args = ["-metrics", "-config=$${NOMAD_TASK_DIR}/config.yml"] service_port = 8080 metrics_port_name = "main" templates = [ { data = <