Skip to content

Commit

Permalink
Merge pull request #62 from NHSDigital/feature/CCM-7632_webcms_cname
Browse files Browse the repository at this point in the history
CCM: 7632: webcms cname
  • Loading branch information
sidnhs authored Nov 28, 2024
2 parents abc9a13 + 29449be commit 2fdc31b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
resource "aws_route53_record" "subdomain_delegated_zones" {
for_each = {
for i, dz in var.delegated_dns_zones :
dz.subdomain => dz
dz.subdomain => dz
}

zone_id = aws_route53_zone.root.zone_id
Expand Down
Original file line number Diff line number Diff line change
@@ -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"]
}
14 changes: 10 additions & 4 deletions infrastructure/terraform/components/dnsroot/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@ variable "root_domain_name" {

variable "delegated_dns_zones" {
type = list(object({
subdomain = string,
ns_records = list(string),
}))
subdomain = string,
ns_records = list(string),
}))
description = "An object representing DNS zone delegation nameservers"
default = []
default = []
}

variable "cms_cname" {
type = string
description = "The CNAME to be used for Web CMS static site"
default = "webcms"
}

0 comments on commit 2fdc31b

Please sign in to comment.