Add waiting for loki and prom dependencies in core
This commit is contained in:
parent
df4737655a
commit
ad439d48f3
@ -1,5 +1,6 @@
|
||||
module "loki" {
|
||||
source = "../services/service"
|
||||
detach = false
|
||||
|
||||
name = "loki"
|
||||
image = "grafana/loki:2.2.1"
|
||||
|
@ -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" {
|
||||
|
@ -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" {
|
||||
|
@ -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" {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user