Add waiting for loki and prom dependencies in core

This commit is contained in:
IamTheFij 2023-09-27 21:30:22 -07:00
parent df4737655a
commit ad439d48f3
5 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,6 @@
module "loki" {
source = "../services/service"
detach = false
name = "loki"
image = "grafana/loki:2.2.1"

View File

@ -18,6 +18,8 @@ resource "nomad_job" "nomad-client-stalker" {
resource "nomad_job" "syslog-ng" {
jobspec = file("${path.module}/syslogng.nomad")
depends_on = [module.loki]
}
resource "nomad_job" "ddclient" {

View File

@ -8,6 +8,8 @@ resource "nomad_job" "prometheus" {
jobspec = templatefile("${path.module}/prometheus.nomad", {
use_wesher = var.use_wesher,
})
detach = false
}
resource "nomad_job" "grafana" {

View File

@ -39,6 +39,8 @@ resource "nomad_job" "service" {
mysql_bootstrap = var.mysql_bootstrap
postgres_bootstrap = var.postgres_bootstrap
})
detach = var.detach
}
resource "nomad_acl_policy" "secrets_mysql" {

View File

@ -3,6 +3,12 @@ variable "name" {
description = "Name of the service"
}
variable "detach" {
type = bool
default = true
description = "Detach from Nomad and not wait for job to start"
}
variable "instance_count" {
type = number
default = 1