aboutsummaryrefslogtreecommitdiff
path: root/terraform/concourse
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2022-12-23 09:11:34 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2022-12-23 09:11:34 +0100
commit9572ac5ffbb869f59f354303556f90e86bd67bcc (patch)
tree90a91a8d8cd22861fe77c27fe19257907dbe3cc2 /terraform/concourse
parent19d2406d9a51f41ba70c1b9d503fa4cc3bf2af24 (diff)
downloadinfra-9572ac5ffbb869f59f354303556f90e86bd67bcc.tar.gz
infra-9572ac5ffbb869f59f354303556f90e86bd67bcc.tar.bz2
infra-9572ac5ffbb869f59f354303556f90e86bd67bcc.tar.xz
infra-9572ac5ffbb869f59f354303556f90e86bd67bcc.zip
concourse
Diffstat (limited to 'terraform/concourse')
-rw-r--r--terraform/concourse/concourse.tf4
-rw-r--r--terraform/concourse/dns.tf10
-rw-r--r--terraform/concourse/main.tf4
3 files changed, 16 insertions, 2 deletions
diff --git a/terraform/concourse/concourse.tf b/terraform/concourse/concourse.tf
index 28b6d21..9bbb3b4 100644
--- a/terraform/concourse/concourse.tf
+++ b/terraform/concourse/concourse.tf
@@ -31,7 +31,7 @@ resource "docker_container" "concourse" {
}
labels {
label = "traefik.http.routers.concourse.rule"
- value = "Host(`concourse.vpn.trygvis.io`)"
+ value = "Host(`${local.domain_name}`)"
}
labels {
label = "traefik.http.routers.concourse.entrypoints"
@@ -49,7 +49,7 @@ resource "docker_container" "concourse" {
"CONCOURSE_POSTGRES_DATABASE=concourse",
"CONCOURSE_POSTGRES_PORT=5432",
"CONCOURSE_POSTGRES_SSLMODE=require",
- "CONCOURSE_EXTERNAL_URL=https://concourse.vpn.trygvis.io",
+ "CONCOURSE_EXTERNAL_URL=https://${local.domain_name}",
"CONCOURSE_WORKER_BAGGAGECLAIM_DRIVER=overlay",
"CONCOURSE_CLIENT_SECRET=Y29uY291cnNlLXdlYgo=",
"CONCOURSE_TSA_CLIENT_SECRET=Y29uY291cnNlLXdvcmtlcgo=",
diff --git a/terraform/concourse/dns.tf b/terraform/concourse/dns.tf
new file mode 100644
index 0000000..68e1764
--- /dev/null
+++ b/terraform/concourse/dns.tf
@@ -0,0 +1,10 @@
+data "linode_domain" "root" {
+ domain = "trygvis.io"
+}
+
+resource "linode_domain_record" "concourse-vpn" {
+ domain_id = data.linode_domain.root.id
+ name = "concourse.vpn"
+ record_type = "CNAME"
+ target = local.domain_name
+}
diff --git a/terraform/concourse/main.tf b/terraform/concourse/main.tf
index fc4b088..49bad5e 100644
--- a/terraform/concourse/main.tf
+++ b/terraform/concourse/main.tf
@@ -42,3 +42,7 @@ provider "ansiblevault" {
data "docker_network" "traefik" {
name = "traefik"
}
+
+locals {
+ domain_name = "concourse.vpn.trygvis.io"
+}