From 2f95257325b4381d513bc8e024b31afcb1922162 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 --- mysql/mysql.tf | 3 +++ services.tf | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mysql/mysql.tf b/mysql/mysql.tf index ddffe7c..45aa6f9 100644 --- a/mysql/mysql.tf +++ b/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/services.tf b/services.tf index 136b22e..2a439cb 100644 --- a/services.tf +++ b/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" {