File tree Expand file tree Collapse file tree 6 files changed +36
-8
lines changed
Expand file tree Collapse file tree 6 files changed +36
-8
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff 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 = [
Original file line number Diff line number Diff line change 11variable "cluster_id" {}
22variable "logs_group_name" {}
33variable "server_ip" {}
4+ variable "cf_domain_name" {}
5+ variable "cf_hosted_zone_id" {}
Original file line number Diff line number Diff 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
225225resource "aws_route53_record" "email_flodesk" {
226226 zone_id = aws_route53_zone. pyconit . id
You can’t perform that action at this time.
0 commit comments