From b1892d6517abaf89d5deb624712b310ce3e1a5b9 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 22 Aug 2024 21:45:35 +0200 Subject: grafana & prometheus --- terraform/conflatorio-docker/main.tf | 2 ++ terraform/conflatorio-docker/network.tf | 16 ++++++++++++++++ terraform/conflatorio-docker/traefik.tf | 2 ++ 3 files changed, 20 insertions(+) (limited to 'terraform/conflatorio-docker') diff --git a/terraform/conflatorio-docker/main.tf b/terraform/conflatorio-docker/main.tf index 5d52b4e..e7b11ad 100644 --- a/terraform/conflatorio-docker/main.tf +++ b/terraform/conflatorio-docker/main.tf @@ -26,6 +26,8 @@ locals { public_ip = "fdb1:4242:3538:2001::ffff" network_addr = "fdb1:4242:3538:2001:1001::" network_range = 112 + private_network_addr = "fdb1:4242:3538:2001:1002::" + private_network_range = 112 } output "foo" { diff --git a/terraform/conflatorio-docker/network.tf b/terraform/conflatorio-docker/network.tf index b548fef..8a839f5 100644 --- a/terraform/conflatorio-docker/network.tf +++ b/terraform/conflatorio-docker/network.tf @@ -6,4 +6,20 @@ resource "docker_network" "public" { ipam_config { subnet = "${local.network_addr}/${local.network_range}" } + + ipam_config { + gateway = "172.22.0.1" + subnet = "172.22.0.0/16" + } +} + +# Internal shared network +resource "docker_network" "private" { + name = "private" + + ipv6 = true + + ipam_config { + subnet = "${local.private_network_addr}/${local.private_network_range}" + } } diff --git a/terraform/conflatorio-docker/traefik.tf b/terraform/conflatorio-docker/traefik.tf index 98f7e7e..cb5f2a0 100644 --- a/terraform/conflatorio-docker/traefik.tf +++ b/terraform/conflatorio-docker/traefik.tf @@ -12,6 +12,8 @@ resource "docker_container" "traefik" { privileged = false must_run = false + network_mode = "bridge" + networks_advanced { name = docker_network.traefik.name } -- cgit v1.2.3