From 3ec1d008e8c8df12e860c0ca5cb8021410c87b7e Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Mon, 25 Jul 2022 15:54:23 -0700 Subject: [PATCH] Move traefik connect intents to core --- nomad/core.tf | 22 ++++++++++++++++++++++ nomad/services.tf | 23 ----------------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/nomad/core.tf b/nomad/core.tf index 961140b..ec1f25d 100644 --- a/nomad/core.tf +++ b/nomad/core.tf @@ -93,3 +93,25 @@ resource "consul_config_entry" "syslogng_promtail_intent" { ] }) } + +resource "consul_config_entry" "global_access" { + name = "*" + kind = "service-intentions" + + config_json = jsonencode({ + Sources = [ + { + Action = "allow" + Name = "traefik" + Precedence = 6 + Type = "consul" + }, + { + Action = "deny" + Name = "*" + Precedence = 5 + Type = "consul" + }, + ] + }) +} diff --git a/nomad/services.tf b/nomad/services.tf index f0c2412..25639c7 100644 --- a/nomad/services.tf +++ b/nomad/services.tf @@ -1,4 +1,3 @@ - module "nextcloud" { source = "./nextcloud" @@ -25,25 +24,3 @@ resource "nomad_job" "whoami" { jobspec = file("${path.module}/whoami.nomad") } - -resource "consul_config_entry" "global_access" { - name = "*" - kind = "service-intentions" - - config_json = jsonencode({ - Sources = [ - { - Action = "allow" - Name = "traefik" - Precedence = 6 - Type = "consul" - }, - { - Action = "deny" - Name = "*" - Precedence = 5 - Type = "consul" - }, - ] - }) -}