From d6407d25a0c610e6ac604e3aabc5fac1a0b1de7e Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Tue, 24 May 2022 20:10:26 -0700 Subject: [PATCH] Wait until mysql is deployed before continuing Otherwise dependent jobs will fail and take up time restarting --- nomad/mysql/mysql.tf | 3 +++ nomad/services.tf | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nomad/mysql/mysql.tf b/nomad/mysql/mysql.tf index ddffe7c..45aa6f9 100644 --- a/nomad/mysql/mysql.tf +++ b/nomad/mysql/mysql.tf @@ -4,6 +4,9 @@ resource "nomad_job" "mysql-server" { } jobspec = file("${path.module}/mysql.nomad") + + # Block until deployed as there are servics dependent on this one + detach = false } resource "nomad_job" "adminer" { diff --git a/nomad/services.tf b/nomad/services.tf index 136b22e..2a439cb 100644 --- a/nomad/services.tf +++ b/nomad/services.tf @@ -10,7 +10,7 @@ module "blocky" { source = "./blocky" base_hostname = var.base_hostname - depends_on = [module.mysql-server, module.redis] + depends_on = [module.redis] } module "traefik" {