From e1a666ff5e334942547fff9cccf3fc8b212e4c8c Mon Sep 17 00:00:00 2001 From: James Hochadel Date: Mon, 16 Dec 2024 20:15:52 -0500 Subject: [PATCH] Add DNS records for CSB documentation proxy Related to: https://github.com/cloud-gov/product/issues/3216 --- terraform/modules/environment_dns/dns.tf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/terraform/modules/environment_dns/dns.tf b/terraform/modules/environment_dns/dns.tf index a57f30612..25db60fa9 100644 --- a/terraform/modules/environment_dns/dns.tf +++ b/terraform/modules/environment_dns/dns.tf @@ -222,3 +222,19 @@ resource "aws_route53_record" "brokered_mail_ns" { ttl = "30" records = aws_route53_zone.brokered_mail_zone.name_servers } + +locals { + csb_docproxy_subdomain_name = "_acme-challenge.services.${var.domain}." + csb_docproxy_subdomain_value = "_acme-challenge.services.${var.domain}.external-domains-${var.stack_name}.${var.domain}." +} + +// DNS records corresponding to the External Domain Service Instance +// provisioned for the Cloud Service Broker documentation proxy. +// Repo: https://github.com/cloud-gov/csb +resource "aws_route53_record" "csb_docproxy" { + name = local.csb_docproxy_subdomain_name + type = "CNAME" + zone_id = var.zone_id + + records = [local.csb_docproxy_subdomain_value] +}