From 6fcc49f03005ee7310f883ffd85d2bcd8c5e96a0 Mon Sep 17 00:00:00 2001 From: Myne Date: Thu, 28 Dec 2023 15:24:18 +0800 Subject: [PATCH] fix(examples/templates/nomad-docker): ignore `NOMAD_NAMESPACE` and `NOMAD_REGION` when Coder is running in nomad (#11341) --- examples/templates/nomad-docker/main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/templates/nomad-docker/main.tf b/examples/templates/nomad-docker/main.tf index 26a9e2f09f..7ec684def2 100644 --- a/examples/templates/nomad-docker/main.tf +++ b/examples/templates/nomad-docker/main.tf @@ -27,6 +27,12 @@ provider "coder" {} provider "nomad" { address = var.nomad_provider_address http_auth = var.nomad_provider_http_auth == "" ? null : var.nomad_provider_http_auth + + # Fix reading the NOMAD_NAMESPACE and the NOMAD_REGION env var from the coder's allocation. + ignore_env_vars = { + "NOMAD_NAMESPACE" = true + "NOMAD_REGION" = true + } } data "coder_parameter" "cpu" {