aboutsummaryrefslogtreecommitdiff
path: root/terraform/concourse
diff options
context:
space:
mode:
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"
+}