Add waiting for loki and prom dependencies in core
This commit is contained in:
parent
df4737655a
commit
ad439d48f3
@ -1,5 +1,6 @@
|
|||||||
module "loki" {
|
module "loki" {
|
||||||
source = "../services/service"
|
source = "../services/service"
|
||||||
|
detach = false
|
||||||
|
|
||||||
name = "loki"
|
name = "loki"
|
||||||
image = "grafana/loki:2.2.1"
|
image = "grafana/loki:2.2.1"
|
||||||
|
@ -18,6 +18,8 @@ resource "nomad_job" "nomad-client-stalker" {
|
|||||||
|
|
||||||
resource "nomad_job" "syslog-ng" {
|
resource "nomad_job" "syslog-ng" {
|
||||||
jobspec = file("${path.module}/syslogng.nomad")
|
jobspec = file("${path.module}/syslogng.nomad")
|
||||||
|
|
||||||
|
depends_on = [module.loki]
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "nomad_job" "ddclient" {
|
resource "nomad_job" "ddclient" {
|
||||||
|
@ -8,6 +8,8 @@ resource "nomad_job" "prometheus" {
|
|||||||
jobspec = templatefile("${path.module}/prometheus.nomad", {
|
jobspec = templatefile("${path.module}/prometheus.nomad", {
|
||||||
use_wesher = var.use_wesher,
|
use_wesher = var.use_wesher,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
detach = false
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "nomad_job" "grafana" {
|
resource "nomad_job" "grafana" {
|
||||||
|
@ -39,6 +39,8 @@ resource "nomad_job" "service" {
|
|||||||
mysql_bootstrap = var.mysql_bootstrap
|
mysql_bootstrap = var.mysql_bootstrap
|
||||||
postgres_bootstrap = var.postgres_bootstrap
|
postgres_bootstrap = var.postgres_bootstrap
|
||||||
})
|
})
|
||||||
|
|
||||||
|
detach = var.detach
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "nomad_acl_policy" "secrets_mysql" {
|
resource "nomad_acl_policy" "secrets_mysql" {
|
||||||
|
@ -3,6 +3,12 @@ variable "name" {
|
|||||||
description = "Name of the service"
|
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" {
|
variable "instance_count" {
|
||||||
type = number
|
type = number
|
||||||
default = 1
|
default = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user