All checks were successful
🔧 Pipeline / 🪨 Terraform (push) Successful in 7s
## 🔍 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>
22 lines
604 B
HCL
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]
|
|
} |