From 456dc031fc263802caec230f1e8a490b82d2f5c2 Mon Sep 17 00:00:00 2001 From: Olivia Campbell Date: Tue, 30 Jan 2024 16:20:48 +0000 Subject: [PATCH] Update Container app module to v1.4.9 1.4.9 is the latest release for ACA module. Add future scaling capability for containers. --- terraform/README.md | 3 ++- terraform/container-apps-hosting.tf | 3 ++- terraform/locals.tf | 1 + terraform/variables.tf | 6 ++++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/terraform/README.md b/terraform/README.md index 7d5a85e40..353b384b1 100644 --- a/terraform/README.md +++ b/terraform/README.md @@ -136,7 +136,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.4.5 | +| [azure\_container\_apps\_hosting](#module\_azure\_container\_apps\_hosting) | github.com/DFE-Digital/terraform-azurerm-container-apps-hosting | v1.4.9 | | [azurerm\_key\_vault](#module\_azurerm\_key\_vault) | github.com/DFE-Digital/terraform-azurerm-key-vault-tfvars | v0.3.0 | | [statuscake-tls-monitor](#module\_statuscake-tls-monitor) | github.com/dfe-digital/terraform-statuscake-tls-monitor | v0.1.2 | @@ -160,6 +160,7 @@ No resources. | [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 | | [container\_max\_replicas](#input\_container\_max\_replicas) | Container max replicas | `number` | `2` | no | +| [container\_scale\_http\_concurrency](#input\_container\_scale\_http\_concurrency) | When the number of concurrent HTTP requests exceeds this value, then another replica is added. Replicas continue to add to the pool up to the max-replicas amount. | `number` | `10` | no | | [container\_secret\_environment\_variables](#input\_container\_secret\_environment\_variables) | Container secret environment variables | `map(string)` | n/a | yes | | [dns\_a\_records](#input\_dns\_a\_records) | DNS A records to add to the DNS Zone |
map(
object({
ttl : optional(number, 300),
records : list(string)
})
)
| n/a | yes | | [dns\_ns\_records](#input\_dns\_ns\_records) | DNS NS records to add to the DNS Zone |
map(
object({
ttl : optional(number, 300),
records : list(string)
})
)
| n/a | yes | diff --git a/terraform/container-apps-hosting.tf b/terraform/container-apps-hosting.tf index b5c838a88..e9bba6e94 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.4.5" + source = "github.com/DFE-Digital/terraform-azurerm-container-apps-hosting?ref=v1.4.9" environment = local.environment project_name = local.project_name @@ -17,6 +17,7 @@ module "azure_container_apps_hosting" { container_command = local.container_command container_secret_environment_variables = local.container_secret_environment_variables container_max_replicas = local.container_max_replicas + container_scale_http_concurrency = local.container_scale_http_concurrency enable_redis_cache = local.enable_redis_cache diff --git a/terraform/locals.tf b/terraform/locals.tf index 6e5e89b8f..e12ffd171 100644 --- a/terraform/locals.tf +++ b/terraform/locals.tf @@ -10,6 +10,7 @@ locals { registry_managed_identity_assign_role = var.registry_managed_identity_assign_role image_name = var.image_name container_command = var.container_command + container_scale_http_concurrency = var.container_scale_http_concurrency container_secret_environment_variables = var.container_secret_environment_variables container_max_replicas = var.container_max_replicas enable_cdn_frontdoor = var.enable_cdn_frontdoor diff --git a/terraform/variables.tf b/terraform/variables.tf index 15cfd3a8a..5d7e3c3fd 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -132,6 +132,12 @@ variable "container_apps_allow_ips_inbound" { default = [] } +variable "container_scale_http_concurrency" { + description = "When the number of concurrent HTTP requests exceeds this value, then another replica is added. Replicas continue to add to the pool up to the max-replicas amount." + type = number + default = 10 +} + variable "enable_dns_zone" { description = "Conditionally create a DNS zone" type = bool