Add terranix config for gateway-mesh

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-06-15 23:09:56 +02:00
parent 85d06f4c71
commit 86d13b4f40
2 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,16 @@
{ elib, ... }:
let
inherit (elib)
nomadJob;
in
{
resource."nomad_job"."mesh" = nomadJob {
jobspec = ./job.hcl;
vars = {
"datacenters" = builtins.toJSON [
"do-1"
"homelab-1"
];
};
};
}

View file

@ -0,0 +1,30 @@
variable "datacenters" {
type = list(string)
}
job "gateway-mesh" {
datacenters = var.datacenters
group "envoy" {
network {
mode = "bridge"
port "mesh_wan" {
host_network = "mesh"
}
}
service {
name = "mesh-gateway"
port = "mesh_wan"
connect {
gateway {
mesh {}
proxy {}
}
}
}
}
}