From 2c5bc2aa55f6a1cc8edabd0ba45ae06f67fbccc9 Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Mon, 9 Nov 2020 17:30:18 -0500 Subject: [PATCH] demo: create explicit dependency between jobs and cluster on Azure --- demo/remote/azure/terraform/control/main.tf | 3 ++- .../terraform/modules/shared-nomad-jobs/version.tf | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/demo/remote/azure/terraform/control/main.tf b/demo/remote/azure/terraform/control/main.tf index 391b5039..c7b75070 100644 --- a/demo/remote/azure/terraform/control/main.tf +++ b/demo/remote/azure/terraform/control/main.tf @@ -11,7 +11,8 @@ module "hashistack_cluster" { } module "hashistack_jobs" { - source = "../../../terraform/modules/shared-nomad-jobs" + source = "../../../terraform/modules/shared-nomad-jobs" + depends_on = [module.hashistack_cluster] nomad_addr = module.hashistack_cluster.nomad_addr } diff --git a/demo/remote/terraform/modules/shared-nomad-jobs/version.tf b/demo/remote/terraform/modules/shared-nomad-jobs/version.tf index 0b75b50a..703b7bfe 100644 --- a/demo/remote/terraform/modules/shared-nomad-jobs/version.tf +++ b/demo/remote/terraform/modules/shared-nomad-jobs/version.tf @@ -1,8 +1,9 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 0.13" + required_providers { + nomad = { + source = "hashicorp/nomad" + version = ">= 1.4.6" + } + } } - -provider "nomad" { - version = "~> 1.4.6" - address = var.nomad_addr -} \ No newline at end of file