File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ module "azure" {
4949 virtual_network_subnet_address_prefix_container_instances = var. virtual_network_subnet_address_prefix_container_instances
5050 virtual_network_subnet_address_prefix_private_endpoints = var. virtual_network_subnet_address_prefix_private_endpoints
5151 storage_account_replication_type = var. storage_account_replication_type
52+ container_registry_zone_redundancy_enabled = var. agent_container_zone_support
5253 public_ip_name = local. resource_names . public_ip
5354 nat_gateway_name = local. resource_names . nat_gateway
5455 use_self_hosted_agents = var. use_self_hosted_agents
Original file line number Diff line number Diff line change @@ -391,9 +391,11 @@ variable "agent_container_memory_max" {
391391
392392variable "agent_container_zone_support" {
393393 description = <<- EOT
394- **(Optional, default: `true`)** Enable availability zone support for Azure DevOps agent container instances.
394+ **(Optional, default: `true`)** Enable availability zone support for Azure DevOps agent container instances and container registry .
395395
396- When enabled, containers are distributed across availability zones for higher availability and resilience.
396+ When enabled, containers are distributed across availability zones for higher availability and resilience,
397+ and the container registry is configured with zone redundancy.
398+ Some regions do not support availability zones, in which case this should be set to false.
397399 EOT
398400 type = bool
399401 default = true
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ module "azure" {
5050 virtual_network_subnet_address_prefix_container_instances = var. virtual_network_subnet_address_prefix_container_instances
5151 virtual_network_subnet_address_prefix_private_endpoints = var. virtual_network_subnet_address_prefix_private_endpoints
5252 storage_account_replication_type = var. storage_account_replication_type
53+ container_registry_zone_redundancy_enabled = var. runner_container_zone_support
5354 public_ip_name = local. resource_names . public_ip
5455 nat_gateway_name = local. resource_names . nat_gateway
5556 use_self_hosted_agents = var. use_self_hosted_runners
Original file line number Diff line number Diff line change @@ -496,9 +496,11 @@ variable "runner_container_memory_max" {
496496
497497variable "runner_container_zone_support" {
498498 description = <<- EOT
499- **(Optional, default: `true`)** Enable availability zone support for GitHub runner container instances.
499+ **(Optional, default: `true`)** Enable availability zone support for GitHub runner container instances and container registry .
500500
501- When enabled, containers are distributed across availability zones for higher availability and resilience.
501+ When enabled, containers are distributed across availability zones for higher availability and resilience,
502+ and the container registry is configured with zone redundancy.
503+ Some regions do not support availability zones, in which case this should be set to false.
502504 EOT
503505 type = bool
504506 default = true
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ resource "azurerm_container_registry" "alz" {
55 location = var. azure_location
66 sku = var. use_private_networking ? " Premium" : " Basic"
77 public_network_access_enabled = ! var. use_private_networking
8- zone_redundancy_enabled = var. use_private_networking
8+ zone_redundancy_enabled = var. use_private_networking && var . container_registry_zone_redundancy_enabled
99 network_rule_bypass_option = var. use_private_networking ? " AzureServices" : " None"
1010}
1111
Original file line number Diff line number Diff line change @@ -528,6 +528,18 @@ variable "container_registry_image_name" {
528528 default = " "
529529}
530530
531+ variable "container_registry_zone_redundancy_enabled" {
532+ description = <<- EOT
533+ **(Optional, default: `true`)** Enable zone redundancy for the Azure Container Registry.
534+
535+ When enabled, the container registry is replicated across availability zones for higher availability.
536+ Some regions do not support zone redundancy, in which case this should be set to false.
537+ Zone redundancy requires Premium SKU, which is only used when private networking is enabled.
538+ EOT
539+ type = bool
540+ default = true
541+ }
542+
531543variable "container_registry_image_tag" {
532544 description = <<- EOT
533545 **(Optional, default: `"{{.Run.ID}}"`)** Tag pattern for the container image.
You can’t perform that action at this time.
0 commit comments