Files
web/terraform/routing.tf
Max ea7e38e12d
All checks were successful
🔧 Pipeline / 🪨 Terraform (push) Successful in 7s
I lost my data. (#18)
## 🔍 Motivation & Context

My data is lost.

## 🔖 Related Issue

None.

##  Changes

I accidentally overwrote my Gitea data.

Reviewed-on: https://code.maximhutz.com/Infrastructure/Codebase/pulls/18
Co-authored-by: Max <git@maximhutz.me>
Co-committed-by: Max <git@maximhutz.me>
2025-01-08 23:20:08 +00:00

22 lines
604 B
HCL

# The Route53 DNS zone.
data "aws_route53_zone" "main" {
name = local.domain_name
}
# Push all domain traffic through the reverse proxy.
resource "aws_route53_record" "main_domain" {
zone_id = data.aws_route53_zone.main.zone_id
name = data.aws_route53_zone.main.name
type = "A"
ttl = "60"
records = [aws_eip.public.public_ip]
}
# Also push all subdomain traffic.
resource "aws_route53_record" "sub_domains" {
zone_id = data.aws_route53_zone.main.zone_id
name = "*.${data.aws_route53_zone.main.name}"
type = "A"
ttl = "60"
records = [aws_eip.public.public_ip]
}