From 50838f5decb5cf34c64ec7e5f826a67662246ad1 Mon Sep 17 00:00:00 2001 From: Pat Heard Date: Fri, 8 Nov 2024 13:11:58 -0500 Subject: [PATCH] feat: add CNAMEs for Flood Risk Portal Add CNAMEs to the StatsCan Flood Risk Portal. --- terraform/statcan.alpha.canada.ca.tf | 42 +++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/terraform/statcan.alpha.canada.ca.tf b/terraform/statcan.alpha.canada.ca.tf index 642bdb3..791c8e2 100644 --- a/terraform/statcan.alpha.canada.ca.tf +++ b/terraform/statcan.alpha.canada.ca.tf @@ -81,4 +81,44 @@ resource "aws_route53_record" "_acme-challenge-recensement-alpha-canada-ca-CNAME join(".", [aws_route53_record.recensement-alpha-canada-ca-CNAME.name, local.challenges_subdomain]) ] ttl = "300" -} \ No newline at end of file +} + +resource "aws_route53_record" "hazard-risk-search-ps-alpha-canada-ca-CNAME" { + zone_id = aws_route53_zone.alpha-canada-ca-public.zone_id + name = "hazard-risk-search.ps.alpha.canada.ca" + type = "CNAME" + records = [ + "flood-risk-portal.prod.cloud.statcan.ca" + ] + ttl = "300" +} + +resource "aws_route53_record" "_acme-challenge-hazard-risk-search-ps-alpha-canada-ca-CNAME" { + zone_id = aws_route53_zone.alpha-canada-ca-public.zone_id + name = join(".", [local.acme_challenge, aws_route53_record.hazard-risk-search-ps-alpha-canada-ca-CNAME.name]) + type = "CNAME" + records = [ + join(".", [aws_route53_record.hazard-risk-search-ps-alpha-canada-ca-CNAME.name, local.challenges_subdomain]) + ] + ttl = "300" +} + +resource "aws_route53_record" "recherche-aleas-risques-ps-alpha-canada-ca-CNAME" { + zone_id = aws_route53_zone.alpha-canada-ca-public.zone_id + name = "recherche-aleas-risques.ps.alpha.canada.ca" + type = "CNAME" + records = [ + "flood-risk-portal.prod.cloud.statcan.ca" + ] + ttl = "300" +} + +resource "aws_route53_record" "_acme-challenge-recherche-aleas-risques-ps-alpha-canada-ca-CNAME" { + zone_id = aws_route53_zone.alpha-canada-ca-public.zone_id + name = join(".", [local.acme_challenge, aws_route53_record.recherche-aleas-risques-ps-alpha-canada-ca-CNAME.name]) + type = "CNAME" + records = [ + join(".", [aws_route53_record.recherche-aleas-risques-ps-alpha-canada-ca-CNAME.name, local.challenges_subdomain]) + ] + ttl = "300" +}