diff options
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 } |