[Network] Add LoadBalancer Advanced mode and frontend connection tracking (2025-09-01) - #30017
Open
Eugenio Peña García (EugenioPena) wants to merge 1 commit into
Conversation
…king (2025-09-01) Ports the 2025-09-01 NRP changes from Azure/azure-rest-api-specs#44808 to Az.Network: - Add -Mode to New-AzLoadBalancer (value 'Advanced', create-only) and surface Mode on PSLoadBalancer. - Add -EnableConnectionTracking switch to New/Add/Set-AzLoadBalancerFrontendIpConfig and surface EnableConnectionTracking on PSFrontendIPConfiguration. - Update table format views, help docs, and changelog. - Add record/playback scenario test and a live E2E scenario. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Member
|
/azp run |
Contributor
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Eugenio Peña García (EugenioPena)
marked this pull request as ready for review
August 14, 2026 23:26
Contributor
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Member
|
/azp run |
Contributor
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
Ports the 2025-09-01 Network API load-balancer features into the hand-written Az.Network module.
Changes:
- Adds Advanced load-balancer mode.
- Adds frontend UDP connection tracking across New/Add/Set cmdlets.
- Updates formatting, help, changelog, and tests.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
Network.generated.format.ps1xml |
Displays new properties. |
PSLoadBalancer.cs |
Exposes Mode. |
NewAzureRMLoadBalancerCommand.cs |
Adds -Mode. |
SetAzureRmLoadBalancerFrontendIpConfigCommand.cs |
Adds connection tracking. |
NewAzureRmLoadBalancerFrontendIpConfigCommand.cs |
Adds connection tracking. |
AddAzureRmLoadBalancerFrontendIpConfigCommand.cs |
Adds connection tracking. |
Set-AzLoadBalancerFrontendIpConfig.md |
Documents the switch. |
New-AzLoadBalancerFrontendIpConfig.md |
Documents the switch. |
New-AzLoadBalancer.md |
Documents -Mode. |
Add-AzLoadBalancerFrontendIpConfig.md |
Documents the switch. |
PSFrontendIPConfiguration.cs |
Exposes connection tracking. |
ChangeLog.md |
Records user-facing changes. |
LoadBalancerTests.ps1 |
Adds the scenario test. |
LoadBalancerTests.cs |
Registers the scenario test. |
TestLiveScenarios.ps1 |
Adds live end-to-end coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+340
to
+345
| [Fact] | ||
| [Trait(Category.AcceptanceType, Category.CheckIn)] | ||
| [Trait(Category.Owner, NrpTeamAlias.slbdev)] | ||
| public void TestLoadBalancerAdvancedModeConnectionTracking() | ||
| { | ||
| TestRunner.RunTestScript("Test-LoadBalancerAdvancedModeConnectionTracking"); |
| $publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Static -Sku Standard | ||
|
|
||
| # Create a frontend IP configuration with UDP connection tracking enabled | ||
| $frontend = New-AzLoadBalancerFrontendIpConfig -Name $frontendName -PublicIpAddress $publicip -EnableConnectionTracking |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Ports the 2025-09-01 NRP (Network Resource Provider) changes from the Swagger PR Azure/azure-rest-api-specs#44808 to the hand-written Az.Network module.
Two customer-facing properties are surfaced:
-ModeonNew-AzLoadBalancer— sets the load balancer mode. ValueAdvancedenables additional capabilities on a Standard SKU load balancer. Advanced mode must be specified at creation and cannot be changed afterward (create-only).Modeis surfaced onPSLoadBalancer.-EnableConnectionTrackingswitch onNew/Add/Set-AzLoadBalancerFrontendIpConfig— enables UDP flow tracking for traffic associated with the frontend IP configuration. When enabled, packets belonging to the same UDP flow are consistently directed to the same backend instance, taking precedence over rule-level connection tracking.EnableConnectionTrackingis surfaced onPSFrontendIPConfiguration.The generated .NET SDK on this release branch already contains
LoadBalancer.ModeandFrontendIPConfiguration.EnableConnectionTracking, so this is a PowerShell-layer-only change (AutoMapper maps the new properties by name).Corresponding Swagger PR
Azure/azure-rest-api-specs#44808
Changes
Models/PSLoadBalancer.cs: addMode.Generated/Models/PSFrontendIPConfiguration.cs: addEnableConnectionTracking.LoadBalancer/NewAzureRMLoadBalancerCommand.cs: add-Modeparameter.LoadBalancer/FrontendIPConfiguration/{New,Add,Set}AzureRmLoadBalancerFrontendIpConfigCommand.cs: add-EnableConnectionTrackingswitch.Network.generated.format.ps1xml: add table columns forModeandEnableConnectionTracking.ChangeLog.md.Test-LoadBalancerAdvancedModeConnectionTracking(record/playback) + a live E2E scenario inLiveTests.Testing
dotnet build src/Network/Network/Network.csproj).TestLoadBalancerAdvancedModeConnectionTrackingstill needs itsSessionRecords/*.jsoncaptured against a live subscription (feature must be allowlisted in-region). Record with:Set-TestFxEnvironment -UserId <email> -SubscriptionId <sub> -TenantId <tenant> -RecorderMode "Record"thendotnet test src/Network/Network.Test --filter "FullyQualifiedName~TestLoadBalancerAdvancedModeConnectionTracking".Checklist
ChangeLog.mdupdated under "Upcoming Release".