diff --git a/terraform/README.md b/terraform/README.md index 763415acf..438244041 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 | | [data\_protection](#module\_data\_protection) | github.com/DFE-Digital/terraform-azurerm-aspnet-data-protection | v1.1.0 | | [statuscake-tls-monitor](#module\_statuscake-tls-monitor) | github.com/dfe-digital/terraform-statuscake-tls-monitor | v0.1.4 | @@ -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({| `{}` | 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 | @@ -179,6 +180,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 d11e80997..be92dad47 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 @@ -54,6 +54,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 0f76ddd89..670030ef7 100644 --- a/terraform/locals.tf +++ b/terraform/locals.tf @@ -68,4 +68,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 469d4fd4f..940427734 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -500,3 +500,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" +}
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),
}))
}))