From d4b5aa73f94ba3a8d3a1c4800c193696bfb94168 Mon Sep 17 00:00:00 2001 From: Ash Davies <3853061+DrizzlyOwl@users.noreply.github.com> Date: Fri, 15 Nov 2024 17:40:45 +0000 Subject: [PATCH] Update to v1.15.0 of Container App module (#931) * This version enables us to redirect VDP related paths to the centralised DFE service --- terraform/README.md | 2 ++ terraform/container-apps-hosting.tf | 2 ++ terraform/locals.tf | 2 ++ terraform/variables.tf | 12 ++++++++++++ 4 files changed, 18 insertions(+) diff --git a/terraform/README.md b/terraform/README.md index 354e6b3e5..4690c5110 100644 --- a/terraform/README.md +++ b/terraform/README.md @@ -165,6 +165,7 @@ No resources. | [cdn\_frontdoor\_origin\_host\_header\_override](#input\_cdn\_frontdoor\_origin\_host\_header\_override) | Manually specify the host header that the CDN sends to the target. Defaults to the recieved host header. Set to null to set it to the host\_name (`cdn_frontdoor_origin_fqdn_override`) | `string` | `""` | no | | [cdn\_frontdoor\_rate\_limiting\_duration\_in\_minutes](#input\_cdn\_frontdoor\_rate\_limiting\_duration\_in\_minutes) | CDN Front Door rate limiting duration in minutes | `number` | n/a | yes | | [cdn\_frontdoor\_rate\_limiting\_threshold](#input\_cdn\_frontdoor\_rate\_limiting\_threshold) | CDN Front Door rate limiting duration in minutes | `number` | n/a | yes | +| [cdn\_frontdoor\_vdp\_destination\_hostname](#input\_cdn\_frontdoor\_vdp\_destination\_hostname) | Requires 'enable\_cdn\_frontdoor\_vdp\_redirects' to be set to 'true'. Hostname to redirect security.txt and thanks.txt to | `string` | `"vdp.security.education.gov.uk"` | no | | [cdn\_frontdoor\_waf\_custom\_rules](#input\_cdn\_frontdoor\_waf\_custom\_rules) | Map of all Custom rules you want to apply to the CDN WAF |
map(object({
priority : number,
action : string
match_conditions : map(object({
match_variable : string,
match_values : optional(list(string), []),
operator : optional(string, "Any"),
selector : optional(string, null),
negation_condition : optional(bool, false),
}))
}))
| `{}` | no | | [container\_apps\_allow\_ips\_inbound](#input\_container\_apps\_allow\_ips\_inbound) | Restricts access to the Container Apps by creating a network security group rule that only allow inbound traffic from the provided list of IPs | `list(string)` | `[]` | no | | [container\_command](#input\_container\_command) | Container command | `list(any)` | n/a | yes | @@ -180,6 +181,7 @@ No resources. | [dns\_zone\_domain\_name](#input\_dns\_zone\_domain\_name) | DNS zone domain name. If created, records will automatically be created to point to the CDN. | `string` | n/a | yes | | [enable\_cdn\_frontdoor](#input\_enable\_cdn\_frontdoor) | Enable Azure CDN FrontDoor. This will use the Container Apps endpoint as the origin. | `bool` | n/a | yes | | [enable\_cdn\_frontdoor\_health\_probe](#input\_enable\_cdn\_frontdoor\_health\_probe) | Enable CDN Front Door health probe | `bool` | `false` | no | +| [enable\_cdn\_frontdoor\_vdp\_redirects](#input\_enable\_cdn\_frontdoor\_vdp\_redirects) | Deploy redirects for security.txt and thanks.txt to an external Vulnerability Disclosure Program service | `bool` | `true` | no | | [enable\_container\_app\_blob\_storage](#input\_enable\_container\_app\_blob\_storage) | Create an Azure Storage Account and Storage Container to be accessed by the Container App | `bool` | n/a | yes | | [enable\_container\_app\_file\_share](#input\_enable\_container\_app\_file\_share) | Create an Azure Storage Account and File Share to be mounted to the Container Apps | `bool` | n/a | yes | | [enable\_container\_health\_probe](#input\_enable\_container\_health\_probe) | Enable liveness probes for the Container | `bool` | `true` | no | diff --git a/terraform/container-apps-hosting.tf b/terraform/container-apps-hosting.tf index cdc4f1152..d70a94e0e 100644 --- a/terraform/container-apps-hosting.tf +++ b/terraform/container-apps-hosting.tf @@ -55,6 +55,8 @@ module "azure_container_apps_hosting" { cdn_frontdoor_custom_domains = local.cdn_frontdoor_custom_domains cdn_frontdoor_origin_fqdn_override = local.cdn_frontdoor_origin_fqdn_override cdn_frontdoor_origin_host_header_override = local.cdn_frontdoor_origin_host_header_override + enable_cdn_frontdoor_vdp_redirects = local.enable_cdn_frontdoor_vdp_redirects + cdn_frontdoor_vdp_destination_hostname = local.cdn_frontdoor_vdp_destination_hostname enable_cdn_frontdoor_health_probe = local.enable_cdn_frontdoor_health_probe container_apps_allow_ips_inbound = local.container_apps_allow_ips_inbound diff --git a/terraform/locals.tf b/terraform/locals.tf index efe2e7b0d..92c86b3cb 100644 --- a/terraform/locals.tf +++ b/terraform/locals.tf @@ -69,4 +69,6 @@ locals { enable_health_insights_api = var.enable_health_insights_api health_insights_api_cors_origins = var.health_insights_api_cors_origins health_insights_api_ipv4_allow_list = var.health_insights_api_ipv4_allow_list + enable_cdn_frontdoor_vdp_redirects = var.enable_cdn_frontdoor_vdp_redirects + cdn_frontdoor_vdp_destination_hostname = var.cdn_frontdoor_vdp_destination_hostname } diff --git a/terraform/variables.tf b/terraform/variables.tf index 16bb171b4..c8e3f11d4 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -506,3 +506,15 @@ variable "container_port" { type = number default = 8080 } + +variable "enable_cdn_frontdoor_vdp_redirects" { + description = "Deploy redirects for security.txt and thanks.txt to an external Vulnerability Disclosure Program service" + type = bool + default = true +} + +variable "cdn_frontdoor_vdp_destination_hostname" { + description = "Requires 'enable_cdn_frontdoor_vdp_redirects' to be set to 'true'. Hostname to redirect security.txt and thanks.txt to" + type = string + default = "vdp.security.education.gov.uk" +}