From 4a9f40a03a60489c0629d41759906c0b5a96f2f4 Mon Sep 17 00:00:00 2001 From: maurodandrea <98483756+maurodandrea@users.noreply.github.com> Date: Wed, 14 Feb 2024 10:36:16 +0100 Subject: [PATCH] [DEV-1394] - Create DNS zone for CMS Strapi (#640) * add-dns-zone-and-var-for-strapi add-dns-zone-and-var-for-strapi * update-comment --- .infrastructure/10_dns.tf | 6 ++++++ .infrastructure/98_variables.tf | 7 +++++++ .infrastructure/env/dev/terraform.tfvars | 7 +++++++ .infrastructure/env/prod/terraform.tfvars | 7 +++++++ 4 files changed, 27 insertions(+) diff --git a/.infrastructure/10_dns.tf b/.infrastructure/10_dns.tf index f0bd8beb4..42ec935eb 100644 --- a/.infrastructure/10_dns.tf +++ b/.infrastructure/10_dns.tf @@ -107,3 +107,9 @@ resource "aws_route53_record" "devportal_google_site_verification_txt" { records = ["google-site-verification=Z94dFrXZD0YqP-r5BY5ODb4NsbQBAggTGRZM9fNtOj0"] ttl = 3600 } + +## Route53 DNS zone and Records for CMS Strapi +module "dns_zone_cms" { + source = "git::https://github.com/terraform-aws-modules/terraform-aws-route53.git//modules/zones?ref=bc63328714550fd903d2574b263833c9ce1c867e" # v2.11.0 + zones = var.dns_domain_name_cms +} diff --git a/.infrastructure/98_variables.tf b/.infrastructure/98_variables.tf index 77711e468..20e977cfa 100644 --- a/.infrastructure/98_variables.tf +++ b/.infrastructure/98_variables.tf @@ -66,3 +66,10 @@ variable "cms_app_port" { description = "The standard app port used by CMS Strapi" default = 1337 } + +# CMS Strapi DNS +variable "dns_domain_name_cms" { + description = "DNS domain name of the Developer Portal's CMS" + type = map(any) + default = null +} diff --git a/.infrastructure/env/dev/terraform.tfvars b/.infrastructure/env/dev/terraform.tfvars index 43879e321..21f4d3d2d 100644 --- a/.infrastructure/env/dev/terraform.tfvars +++ b/.infrastructure/env/dev/terraform.tfvars @@ -21,3 +21,10 @@ cdn_custom_headers = [ dns_domain_name = "dev.developer.pagopa.it" use_custom_certificate = true + +# CMS Strapi DNS +dns_domain_name_cms = { + "cms.dev.developer.pagopa.it" = { + comment = "DNS domain name of the Developer Portal's CMS" + } +} \ No newline at end of file diff --git a/.infrastructure/env/prod/terraform.tfvars b/.infrastructure/env/prod/terraform.tfvars index ba4fa9ba5..1dd4b054a 100644 --- a/.infrastructure/env/prod/terraform.tfvars +++ b/.infrastructure/env/prod/terraform.tfvars @@ -24,3 +24,10 @@ dns_delegate_records = { } use_custom_certificate = true + +# CMS Strapi DNS +dns_domain_name_cms = { + "cms.developer.pagopa.it" = { + comment = "DNS domain name of the Developer Portal's CMS" + } +} \ No newline at end of file