From 48a926b03c35bf0b4d9ec47b3a3721970f256e97 Mon Sep 17 00:00:00 2001 From: Olivia Campbell Date: Wed, 31 Jan 2024 13:18:49 +0000 Subject: [PATCH 1/2] Update Container app module to v1.4.9 1.4.9 is the latest release for ACA module. Type of change [x ] Bug fix (non-breaking change which fixes an issue) Expected behaviour dependency update that has bug fixes in for SQL Defender + Logging 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 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 From 20219b5f42c30dc8e4a78f59e5945ef8639edd72 Mon Sep 17 00:00:00 2001 From: Ash Davies <3853061+DrizzlyOwl@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:30:31 +0000 Subject: [PATCH 2/2] TF docs --- terraform/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/README.md b/terraform/README.md index 03a1e476c..41b925cb3 100644 --- a/terraform/README.md +++ b/terraform/README.md @@ -134,7 +134,7 @@ If everything looks good, answer `yes` and wait for the new infrastructure to be | Name | Version | |------|---------| -| [azurerm](#provider\_azurerm) | 3.83.0 | +| [azurerm](#provider\_azurerm) | 3.88.0 | ## Modules