Skip to content
Open
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 alz/azuredevops/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module "azure" {
container_registry_zone_redundancy_enabled = coalesce(var.container_registry_zone_redundancy_enabled, var.agent_container_zone_support)
public_ip_name = local.resource_names.public_ip
nat_gateway_name = local.resource_names.nat_gateway
nat_gateway_zone_redundancy_enabled = var.nat_gateway_zone_redundancy_enabled
use_self_hosted_agents = var.use_self_hosted_agents
container_registry_name = local.resource_names.container_registry
container_registry_private_endpoint_name = local.resource_names.container_registry_private_endpoint
Expand Down
2 changes: 1 addition & 1 deletion alz/azuredevops/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 4.20"
version = "~> 4.67"
}
azapi = {
source = "azure/azapi"
Expand Down
15 changes: 15 additions & 0 deletions alz/azuredevops/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,21 @@ variable "container_registry_zone_redundancy_enabled" {
default = null
}

variable "nat_gateway_zone_redundancy_enabled" {
description = <<-EOT
**(Optional, default: `false`)** Deploy a zone-redundant NAT Gateway and Public IP.

When enabled, the NAT Gateway and its Public IP use the `StandardV2` SKU, and the Public IP spans the availability zones of the region.
When disabled, both use the `Standard` SKU with no availability zones.
Changing this value replaces the NAT Gateway and Public IP, which changes the outbound IP address of the agents.
Some regions do not support the `StandardV2` NAT Gateway, in which case this should be set to false.
Only used when `use_private_networking` and `use_self_hosted_agents` are enabled.
EOT
type = bool
default = false
nullable = false
}

variable "built_in_configuration_file_names" {
description = <<-EOT
**(Optional, default: `["config.yaml", "config-hub-and-spoke-vnet.yaml", "config-virtual-wan.yaml"]`)**
Expand Down
1 change: 1 addition & 0 deletions alz/github/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module "azure" {
container_registry_zone_redundancy_enabled = coalesce(var.container_registry_zone_redundancy_enabled, var.runner_container_zone_support)
public_ip_name = local.resource_names.public_ip
nat_gateway_name = local.resource_names.nat_gateway
nat_gateway_zone_redundancy_enabled = var.nat_gateway_zone_redundancy_enabled
use_self_hosted_agents = var.use_self_hosted_runners
container_registry_name = local.resource_names.container_registry
container_registry_private_endpoint_name = local.resource_names.container_registry_private_endpoint
Expand Down
2 changes: 1 addition & 1 deletion alz/github/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 4.20"
version = "~> 4.67"
}
azapi = {
source = "azure/azapi"
Expand Down
15 changes: 15 additions & 0 deletions alz/github/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,21 @@ variable "container_registry_zone_redundancy_enabled" {
default = null
}

variable "nat_gateway_zone_redundancy_enabled" {
description = <<-EOT
**(Optional, default: `false`)** Deploy a zone-redundant NAT Gateway and Public IP.

When enabled, the NAT Gateway and its Public IP use the `StandardV2` SKU, and the Public IP spans the availability zones of the region.
When disabled, both use the `Standard` SKU with no availability zones.
Changing this value replaces the NAT Gateway and Public IP, which changes the outbound IP address of the runners.
Some regions do not support the `StandardV2` NAT Gateway, in which case this should be set to false.
Only used when `use_private_networking` and `use_self_hosted_runners` are enabled.
EOT
type = bool
default = false
nullable = false
}

variable "runner_name_environment_variable" {
description = <<-EOT
**(Optional, default: `"GH_RUNNER_NAME"`)** The runner name environment variable supplied to the container.
Expand Down
2 changes: 1 addition & 1 deletion alz/local/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 4.20"
version = "~> 4.67"
}
azapi = {
source = "azure/azapi"
Expand Down
5 changes: 3 additions & 2 deletions modules/azure/networking.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ resource "azurerm_public_ip" "alz" {
location = var.azure_location
resource_group_name = azurerm_resource_group.network[0].name
allocation_method = "Static"
sku = "Standard"
sku = var.nat_gateway_zone_redundancy_enabled ? "StandardV2" : "Standard"
zones = var.nat_gateway_zone_redundancy_enabled && length(local.bootstrap_location_zones) > 0 ? local.bootstrap_location_zones : null
}

resource "azurerm_nat_gateway" "alz" {
count = var.use_private_networking && var.use_self_hosted_agents ? 1 : 0
name = var.nat_gateway_name
location = var.azure_location
resource_group_name = azurerm_resource_group.network[0].name
sku_name = "Standard"
sku_name = var.nat_gateway_zone_redundancy_enabled ? "StandardV2" : "Standard"
}

resource "azurerm_nat_gateway_public_ip_association" "alz" {
Expand Down
2 changes: 1 addition & 1 deletion modules/azure/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 4.20"
version = "~> 4.67"
}
azapi = {
source = "azure/azapi"
Expand Down
14 changes: 14 additions & 0 deletions modules/azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,20 @@ variable "nat_gateway_name" {
default = ""
}

variable "nat_gateway_zone_redundancy_enabled" {
description = <<-EOT
**(Optional, default: `false`)** Deploy a zone-redundant NAT Gateway and Public IP.

When enabled, the NAT Gateway and its Public IP use the `StandardV2` SKU, and the Public IP spans the availability zones of the region.
When disabled, both use the `Standard` SKU with no availability zones.
Changing this value replaces the NAT Gateway and Public IP, which changes the outbound IP address of the agents.
Some regions do not support the `StandardV2` NAT Gateway, in which case this should be set to false.
EOT
type = bool
default = false
nullable = false
}

variable "virtual_network_subnet_name_container_instances" {
description = <<-EOT
**(Optional, default: `""`)** Name of the subnet delegated for Azure Container Instances.
Expand Down
Loading