From d744a028bb8af081d564f730fd9a262c4d25f3fe Mon Sep 17 00:00:00 2001 From: Lens0021 / Leslie Date: Sun, 29 Sep 2024 22:57:42 +0900 Subject: [PATCH] test: Add consul_token (#265) * test: Add consul_token * Use the default value of 'test' --- terraform/base.tf | 12 +++++++++--- terraform/mediawiki.tf | 10 ---------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/terraform/base.tf b/terraform/base.tf index 921375e..6e06edf 100644 --- a/terraform/base.tf +++ b/terraform/base.tf @@ -8,6 +8,11 @@ variable "test_nomad_token" { sensitive = true } +variable "test_consul_token" { + type = string + sensitive = true +} + terraform { required_version = "~> 1.0" @@ -45,9 +50,10 @@ provider "nomad" { } provider "nomad" { - alias = "test" - address = data.terraform_remote_state.aws.outputs.test_nomad_addr - secret_id = var.test_nomad_token + alias = "test" + address = data.terraform_remote_state.aws.outputs.test_nomad_addr + secret_id = var.test_nomad_token + consul_token = var.test_consul_token # Should be specified explicitly because of the bug https://github.com/femiwiki/nomad/issues/99 region = "global" } diff --git a/terraform/mediawiki.tf b/terraform/mediawiki.tf index 2a890df..c37fe9f 100644 --- a/terraform/mediawiki.tf +++ b/terraform/mediawiki.tf @@ -1,9 +1,3 @@ -locals { - main_hcl_vals = { - test = false - } -} - resource "nomad_job" "mysql" { depends_on = [ data.nomad_plugin.ebs, @@ -15,7 +9,6 @@ resource "nomad_job" "mysql" { hcl2 { allow_fs = true - vars = local.main_hcl_vals } } @@ -25,7 +18,6 @@ resource "nomad_job" "memcached" { hcl2 { allow_fs = true - vars = local.main_hcl_vals } } @@ -53,7 +45,6 @@ resource "nomad_job" "fastcgi" { hcl2 { allow_fs = true - vars = local.main_hcl_vals } } @@ -87,7 +78,6 @@ resource "nomad_job" "http" { hcl2 { allow_fs = true - vars = local.main_hcl_vals } }