aboutsummaryrefslogtreecommitdiff
path: root/terraform/conflatorio-docker
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2024-08-21 22:47:51 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2024-08-21 22:47:51 +0200
commit06a9c241b2462e9819fd5ca58a519f4f538a85e4 (patch)
tree094465d7588003468eb956001e0255b9756c1f41 /terraform/conflatorio-docker
parent204a5bb09bbb5888621edb25de2b1faad34ab781 (diff)
downloadinfra-06a9c241b2462e9819fd5ca58a519f4f538a85e4.tar.gz
infra-06a9c241b2462e9819fd5ca58a519f4f538a85e4.tar.bz2
infra-06a9c241b2462e9819fd5ca58a519f4f538a85e4.tar.xz
infra-06a9c241b2462e9819fd5ca58a519f4f538a85e4.zip
unifi
Diffstat (limited to 'terraform/conflatorio-docker')
-rw-r--r--terraform/conflatorio-docker/main.tf6
-rw-r--r--terraform/conflatorio-docker/network.tf2
-rw-r--r--terraform/conflatorio-docker/traefik.tf6
3 files changed, 10 insertions, 4 deletions
diff --git a/terraform/conflatorio-docker/main.tf b/terraform/conflatorio-docker/main.tf
index 8a01be6..5d52b4e 100644
--- a/terraform/conflatorio-docker/main.tf
+++ b/terraform/conflatorio-docker/main.tf
@@ -22,6 +22,12 @@ data "sops_file_entry" "linode_token" {
data_key = "linode_token"
}
+locals {
+ public_ip = "fdb1:4242:3538:2001::ffff"
+ network_addr = "fdb1:4242:3538:2001:1001::"
+ network_range = 112
+}
+
output "foo" {
value = "foo!"
}
diff --git a/terraform/conflatorio-docker/network.tf b/terraform/conflatorio-docker/network.tf
index 32e1bfb..b548fef 100644
--- a/terraform/conflatorio-docker/network.tf
+++ b/terraform/conflatorio-docker/network.tf
@@ -4,6 +4,6 @@ resource "docker_network" "public" {
ipv6 = true
ipam_config {
- subnet = "fdf3:aad9:a885:77dd:bbbb::/120"
+ subnet = "${local.network_addr}/${local.network_range}"
}
}
diff --git a/terraform/conflatorio-docker/traefik.tf b/terraform/conflatorio-docker/traefik.tf
index d15ac5c..98f7e7e 100644
--- a/terraform/conflatorio-docker/traefik.tf
+++ b/terraform/conflatorio-docker/traefik.tf
@@ -23,20 +23,20 @@ resource "docker_container" "traefik" {
ports {
internal = 80
external = 80
- ip = "fdf3:aad9:a885:77dd::2"
+ ip = "${local.public_ip}"
}
ports {
internal = 443
external = 443
- ip = "fdf3:aad9:a885:77dd::2"
+ ip = "${local.public_ip}"
}
# for buildfarm-server
ports {
internal = 8980
external = 8980
- ip = "fdf3:aad9:a885:77dd::2"
+ ip = "${local.public_ip}"
}
command = [