diff --git a/terraform/README.md b/terraform/README.md index f1ec7bf88..03a1e476c 100644 --- a/terraform/README.md +++ b/terraform/README.md @@ -140,7 +140,7 @@ If everything looks good, answer `yes` and wait for the new infrastructure to be | Name | Source | Version | |------|--------|---------| -| [azure\_container\_apps\_hosting](#module\_azure\_container\_apps\_hosting) | github.com/DFE-Digital/terraform-azurerm-container-apps-hosting | v1.4.7 | +| [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 | @@ -176,6 +176,7 @@ If everything looks good, answer `yes` and wait for the new infrastructure to be | [container\_max\_replicas](#input\_container\_max\_replicas) | Container max replicas | `number` | n/a | yes | | [container\_memory](#input\_container\_memory) | Container memory in GB | `number` | n/a | yes | | [container\_min\_replicas](#input\_container\_min\_replicas) | Container min replicas | `number` | n/a | yes | +| [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\_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 | | [dns\_txt\_records](#input\_dns\_txt\_records) | DNS TXT 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 e2c9c3fec..2f1ccccba 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.7" + source = "github.com/DFE-Digital/terraform-azurerm-container-apps-hosting?ref=v1.4.9" environment = local.environment project_name = local.project_name @@ -28,6 +28,7 @@ module "azure_container_apps_hosting" { container_memory = local.container_memory container_min_replicas = local.container_min_replicas container_max_replicas = local.container_max_replicas + container_scale_http_concurrency = local.container_scale_http_concurrency enable_redis_cache = local.enable_redis_cache redis_cache_sku = local.redis_cache_sku diff --git a/terraform/locals.tf b/terraform/locals.tf index cbd0f614a..8342fa988 100644 --- a/terraform/locals.tf +++ b/terraform/locals.tf @@ -16,6 +16,7 @@ locals { container_memory = var.container_memory container_min_replicas = var.container_min_replicas container_max_replicas = var.container_max_replicas + container_scale_http_concurrency = var.container_scale_http_concurrency enable_redis_cache = var.enable_redis_cache enable_mssql_database = var.enable_mssql_database mssql_server_admin_password = var.mssql_server_admin_password diff --git a/terraform/variables.tf b/terraform/variables.tf index af5430c69..2e8c9ef3a 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -62,6 +62,12 @@ variable "container_secret_environment_variables" { sensitive = true } +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_redis_cache" { description = "Set to true to create a Redis Cache" type = bool