From 456379c23d21783bc9f4fbb8baf80c3d3ba80576 Mon Sep 17 00:00:00 2001 From: sidnhs Date: Thu, 28 Nov 2024 13:42:46 +0000 Subject: [PATCH] CCM-7632: CDN changes --- .../terraform/components/dnsroot/route53_webcms_cname.tf | 8 ++++++++ infrastructure/terraform/components/dnsroot/variables.tf | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 infrastructure/terraform/components/dnsroot/route53_webcms_cname.tf diff --git a/infrastructure/terraform/components/dnsroot/route53_webcms_cname.tf b/infrastructure/terraform/components/dnsroot/route53_webcms_cname.tf new file mode 100644 index 0000000..f8ec42e --- /dev/null +++ b/infrastructure/terraform/components/dnsroot/route53_webcms_cname.tf @@ -0,0 +1,8 @@ +resource "aws_route53_record" "cms_cname" { + zone_id = aws_route53_zone.root.id + name = var.cms_cname + type = "CNAME" + ttl = 5 + + records = ["nhsdigital.github.io"] +} \ No newline at end of file diff --git a/infrastructure/terraform/components/dnsroot/variables.tf b/infrastructure/terraform/components/dnsroot/variables.tf index 93aa873..99a2803 100644 --- a/infrastructure/terraform/components/dnsroot/variables.tf +++ b/infrastructure/terraform/components/dnsroot/variables.tf @@ -71,3 +71,9 @@ variable "delegated_dns_zones" { description = "An object representing DNS zone delegation nameservers" default = [] } + +variable "cms_cname" { + type = string + description = "The CNAME to be used for Web CMS static site" + default = "webcms" +}