From 9c74faaff23d102254606d078e8ae18f5d4fb270 Mon Sep 17 00:00:00 2001 From: Ash Davies <3853061+DrizzlyOwl@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:42:37 +0100 Subject: [PATCH] Update to v1.15.0 of Container App module * This version enables us to redirect VDP related paths to the centralised DFE service --- terraform/README.md | 4 +++- terraform/container-apps-hosting.tf | 4 +++- terraform/locals.tf | 2 ++ terraform/variables.tf | 12 ++++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/terraform/README.md b/terraform/README.md index ee64a739..02a5ebe9 100644 --- a/terraform/README.md +++ b/terraform/README.md @@ -137,7 +137,7 @@ No providers. | Name | Source | Version | |------|--------|---------| -| [azure\_container\_apps\_hosting](#module\_azure\_container\_apps\_hosting) | github.com/DFE-Digital/terraform-azurerm-container-apps-hosting | v1.14.0 | +| [azure\_container\_apps\_hosting](#module\_azure\_container\_apps\_hosting) | github.com/DFE-Digital/terraform-azurerm-container-apps-hosting | v1.15.0 | | [azurerm\_key\_vault](#module\_azurerm\_key\_vault) | github.com/DFE-Digital/terraform-azurerm-key-vault-tfvars | v0.5.0 | | [statuscake-tls-monitor](#module\_statuscake-tls-monitor) | github.com/dfe-digital/terraform-statuscake-tls-monitor | v0.1.4 | @@ -163,6 +163,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` | `5` | no | | [cdn\_frontdoor\_rate\_limiting\_threshold](#input\_cdn\_frontdoor\_rate\_limiting\_threshold) | Maximum number of concurrent requests before Rate Limiting policy is applied | `number` | `300` | no | +| [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 | @@ -177,6 +178,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\_registry](#input\_enable\_container\_registry) | Set to true to create a container registry | `bool` | n/a | yes | | [enable\_dns\_zone](#input\_enable\_dns\_zone) | Conditionally create a DNS zone | `bool` | n/a | yes | | [enable\_event\_hub](#input\_enable\_event\_hub) | Send Azure Container App logs to an Event Hub sink | `bool` | `false` | no | diff --git a/terraform/container-apps-hosting.tf b/terraform/container-apps-hosting.tf index f73df35b..5d1c1481 100644 --- a/terraform/container-apps-hosting.tf +++ b/terraform/container-apps-hosting.tf @@ -1,5 +1,5 @@ module "azure_container_apps_hosting" { - source = "github.com/DFE-Digital/terraform-azurerm-container-apps-hosting?ref=v1.14.0" + source = "github.com/DFE-Digital/terraform-azurerm-container-apps-hosting?ref=v1.15.0" environment = local.environment project_name = local.project_name @@ -39,6 +39,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 cdn_frontdoor_waf_custom_rules = local.cdn_frontdoor_waf_custom_rules enable_cdn_frontdoor_health_probe = local.enable_cdn_frontdoor_health_probe diff --git a/terraform/locals.tf b/terraform/locals.tf index 2b617abf..fcc6052c 100644 --- a/terraform/locals.tf +++ b/terraform/locals.tf @@ -52,4 +52,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 eb78809b..3e8d32bf 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -406,3 +406,15 @@ variable "health_insights_api_ipv4_allow_list" { type = list(string) default = [] } + +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" +}