Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow operators to override the default minimum number of app Containers #600

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ No resources.
| <a name="input_container_apps_allow_ips_inbound"></a> [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 |
| <a name="input_container_command"></a> [container\_command](#input\_container\_command) | Container command | `list(any)` | n/a | yes |
| <a name="input_container_health_probe_path"></a> [container\_health\_probe\_path](#input\_container\_health\_probe\_path) | Specifies the path that is used to determine the liveness of the Container | `string` | n/a | yes |
| <a name="input_container_min_replicas"></a> [container\_min\_replicas](#input\_container\_min\_replicas) | Container min replicas | `number` | `1` | no |
| <a name="input_container_scale_http_concurrency"></a> [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 |
| <a name="input_container_secret_environment_variables"></a> [container\_secret\_environment\_variables](#input\_container\_secret\_environment\_variables) | Container secret environment variables | `map(string)` | n/a | yes |
| <a name="input_custom_container_apps"></a> [custom\_container\_apps](#input\_custom\_container\_apps) | Custom container apps, by default deployed within the container app environment managed by this module. | <pre>map(object({<br> container_app_environment_id = optional(string, "")<br> resource_group_name = optional(string, "")<br> revision_mode = optional(string, "Single")<br> container_port = optional(number, 0)<br> ingress = optional(object({<br> external_enabled = optional(bool, true)<br> target_port = optional(number, null)<br> traffic_weight = object({<br> percentage = optional(number, 100)<br> })<br> cdn_frontdoor_custom_domain = optional(string, "")<br> cdn_frontdoor_origin_fqdn_override = optional(string, "")<br> cdn_frontdoor_origin_host_header_override = optional(string, "")<br> enable_cdn_frontdoor_health_probe = optional(bool, false)<br> cdn_frontdoor_health_probe_protocol = optional(string, "")<br> cdn_frontdoor_health_probe_interval = optional(number, 120)<br> cdn_frontdoor_health_probe_request_type = optional(string, "")<br> cdn_frontdoor_health_probe_path = optional(string, "")<br> cdn_frontdoor_forwarding_protocol_override = optional(string, "")<br> }), null)<br> identity = optional(list(object({<br> type = string<br> identity_ids = list(string)<br> })), [])<br> secrets = optional(list(object({<br> name = string<br> value = string<br> })), [])<br> registry = optional(object({<br> server = optional(string, "")<br> username = optional(string, "")<br> password_secret_name = optional(string, "")<br> identity = optional(string, "")<br> }), null),<br> image = string<br> cpu = number<br> memory = number<br> command = list(string)<br> liveness_probes = optional(list(object({<br> interval_seconds = number<br> transport = string<br> port = number<br> path = optional(string, null)<br> })), [])<br> env = optional(list(object({<br> name = string<br> value = optional(string, null)<br> secretRef = optional(string, null)<br> })), [])<br> min_replicas = number<br> max_replicas = number<br> }))</pre> | `{}` | no |
Expand Down
1 change: 1 addition & 0 deletions terraform/container-apps-hosting.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module "azure_container_apps_hosting" {
container_secret_environment_variables = local.container_secret_environment_variables
container_scale_http_concurrency = local.container_scale_http_concurrency
container_apps_allow_ips_inbound = local.container_apps_allow_ips_inbound
container_min_replicas = local.container_min_replicas

enable_cdn_frontdoor = local.enable_cdn_frontdoor
cdn_frontdoor_forwarding_protocol = local.cdn_frontdoor_forwarding_protocol
Expand Down
1 change: 1 addition & 0 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ locals {
container_command = var.container_command
container_secret_environment_variables = var.container_secret_environment_variables
container_scale_http_concurrency = var.container_scale_http_concurrency
container_min_replicas = var.container_min_replicas
enable_cdn_frontdoor = var.enable_cdn_frontdoor
enable_event_hub = var.enable_event_hub
enable_logstash_consumer = var.enable_logstash_consumer
Expand Down
6 changes: 6 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,9 @@ variable "custom_container_apps" {
}))
default = {}
}

variable "container_min_replicas" {
description = "Container min replicas"
type = number
default = 1
}