homelab-nomad/services/minitor.tf

30 lines
711 B
Terraform
Raw Normal View History

module "minitor" {
source = "./service"
name = "minitor"
2023-08-11 10:49:55 +00:00
image = "iamthefij/minitor-go:1.4"
args = ["-metrics", "-config=$${NOMAD_TASK_DIR}/config.yml"]
service_port = 8080
prometheus = true
templates = [
{
data = <<EOF
{{ with nomadVar "nomad/jobs/minitor" -}}
MAILGUN_API_KEY={{ .mailgun_api_key }}
{{ end -}}
EOF
dest = "env"
dest_prefix = "$${NOMAD_SECRETS_DIR}/"
env = true
},
{
data = file("${path.module}/minitor-config.yml")
left_delimiter = "[["
right_delimiter = "]]"
dest = "config.yml"
mount = false
},
]
}