Skip to content

Commit

Permalink
demo: create explicit dependency between jobs and cluster on Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
lgfa29 committed Nov 9, 2020
1 parent 2324b30 commit 2c5bc2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion demo/remote/azure/terraform/control/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
13 changes: 7 additions & 6 deletions demo/remote/terraform/modules/shared-nomad-jobs/version.tf
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 2c5bc2a

Please sign in to comment.