Skip to content

Commit 18ac707

Browse files
authored
Update 2025 domain to point to the ECS deployment (#4201)
1 parent 3e40209 commit 18ac707

File tree

6 files changed

+36
-8
lines changed

6 files changed

+36
-8
lines changed

infrastructure/applications/applications.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ module "pycon_frontend" {
3939
cluster_id = module.cluster.cluster_id
4040
logs_group_name = module.cluster.logs_group_name
4141
server_ip = module.cluster.server_ip
42+
cf_domain_name = module.cluster.cf_domain_name
43+
cf_hosted_zone_id = module.cluster.cf_hosted_zone_id
4244

4345
providers = {
4446
aws = aws

infrastructure/applications/cluster/cloudfront.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,11 @@ resource "aws_cloudfront_distribution" "application" {
6666
}
6767
}
6868
}
69+
70+
output "cf_domain_name" {
71+
value = aws_cloudfront_distribution.application.domain_name
72+
}
73+
74+
output "cf_hosted_zone_id" {
75+
value = aws_cloudfront_distribution.application.hosted_zone_id
76+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
data "aws_route53_zone" "zone" {
2+
name = "pycon.it"
3+
}
4+
5+
resource "aws_route53_record" "pycon_2025" {
6+
count = local.is_prod ? 1 : 0
7+
zone_id = data.aws_route53_zone.zone.zone_id
8+
name = "2025.pycon.it"
9+
type = "A"
10+
11+
alias {
12+
name = var.cf_domain_name
13+
zone_id = var.cf_hosted_zone_id
14+
evaluate_target_health = false
15+
}
16+
}

infrastructure/applications/pycon_frontend/task.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ resource "aws_ecs_task_definition" "pycon_frontend" {
1616

1717
dockerLabels = {
1818
"traefik.enable" = "true"
19-
"traefik.http.routers.frontend.rule" = "Host(`${local.alias}`)"
19+
"traefik.http.routers.frontend.rule" = "Host(`${local.alias}`) || Host(`2025.pycon.it`)"
2020
}
2121

2222
environment = [
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
variable "cluster_id" {}
22
variable "logs_group_name" {}
33
variable "server_ip" {}
4+
variable "cf_domain_name" {}
5+
variable "cf_hosted_zone_id" {}

infrastructure/global/domains/pycon_it/records.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,13 @@ resource "aws_route53_record" "pycon_2024" {
214214
ttl = "3600"
215215
}
216216

217-
resource "aws_route53_record" "pycon_2025" {
218-
zone_id = aws_route53_zone.pyconit.id
219-
name = "2025.pycon.it"
220-
type = "CNAME"
221-
records = ["cname.vercel-dns.com"]
222-
ttl = "3600"
223-
}
217+
# resource "aws_route53_record" "pycon_2025" {
218+
# zone_id = aws_route53_zone.pyconit.id
219+
# name = "2025.pycon.it"
220+
# type = "CNAME"
221+
# records = ["cname.vercel-dns.com"]
222+
# ttl = "3600"
223+
# }
224224

225225
resource "aws_route53_record" "email_flodesk" {
226226
zone_id = aws_route53_zone.pyconit.id

0 commit comments

Comments
 (0)