diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2024-08-22 21:45:35 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2024-08-22 21:45:35 +0200 |
commit | b1892d6517abaf89d5deb624712b310ce3e1a5b9 (patch) | |
tree | a89b2ff710dff84e0b89326ee645b25529f74fb7 /terraform/conflatorio-docker | |
parent | 4c53a89d4102c9cbb512ee3cb4afe90e24605239 (diff) | |
download | infra-b1892d6517abaf89d5deb624712b310ce3e1a5b9.tar.gz infra-b1892d6517abaf89d5deb624712b310ce3e1a5b9.tar.bz2 infra-b1892d6517abaf89d5deb624712b310ce3e1a5b9.tar.xz infra-b1892d6517abaf89d5deb624712b310ce3e1a5b9.zip |
grafana & prometheus
Diffstat (limited to 'terraform/conflatorio-docker')
-rw-r--r-- | terraform/conflatorio-docker/main.tf | 2 | ||||
-rw-r--r-- | terraform/conflatorio-docker/network.tf | 16 | ||||
-rw-r--r-- | terraform/conflatorio-docker/traefik.tf | 2 |
3 files changed, 20 insertions, 0 deletions
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 } |