Skip to content

Commit

Permalink
Add Azure Front Door security rule to outbound NSG
Browse files Browse the repository at this point in the history
Azure Support tells us that we need to add this egress rule to guarantee that AKS provisioning will return successfully. Unfortunately the Azure docs don't mention that at all, but we've verified that what Support told us is a viable workaround.
  • Loading branch information
fabiendelpierre authored Mar 25, 2021
2 parents 2886f42 + f315ac4 commit bfe925b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions subnet_config/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,18 @@ resource "azurerm_network_security_rule" "aks_ssl" {
resource_group_name = var.subnet_info.resource_group_name
network_security_group_name = var.subnet_info.network_security_group_name
}

resource "azurerm_network_security_rule" "aks_front_door_ssl" {
count = (var.configure_nsg_rules ? 1 : 0)
name = "AKS_AllowFrontDoor"
priority = (var.nsg_rule_priority_start + 4)
direction = "Outbound"
access = "Allow"
protocol = "tcp"
source_port_range = "*"
destination_port_range = "443"
source_address_prefix = "*"
destination_address_prefix = "AzureFrontDoor.FirstParty"
resource_group_name = var.subnet_info.resource_group_name
network_security_group_name = var.subnet_info.network_security_group_name
}

0 comments on commit bfe925b

Please sign in to comment.