Skip to content

[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
Azure:release-network-2025-09-01from
EugenioPena:ps-lb-mode-connectiontracking-2025-09-01
Open

[Network] Add LoadBalancer Advanced mode and frontend connection tracking (2025-09-01)#30017
Eugenio Peña García (EugenioPena) wants to merge 1 commit into
Azure:release-network-2025-09-01from
EugenioPena:ps-lb-mode-connectiontracking-2025-09-01

Conversation

@EugenioPena

Copy link
Copy Markdown
Member

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:

  • -Mode on New-AzLoadBalancer — sets the load balancer mode. Value Advanced enables additional capabilities on a Standard SKU load balancer. Advanced mode must be specified at creation and cannot be changed afterward (create-only). Mode is surfaced on PSLoadBalancer.
  • -EnableConnectionTracking switch on New/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. EnableConnectionTracking is surfaced on PSFrontendIPConfiguration.

The generated .NET SDK on this release branch already contains LoadBalancer.Mode and FrontendIPConfiguration.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: add Mode.
  • Generated/Models/PSFrontendIPConfiguration.cs: add EnableConnectionTracking.
  • LoadBalancer/NewAzureRMLoadBalancerCommand.cs: add -Mode parameter.
  • LoadBalancer/FrontendIPConfiguration/{New,Add,Set}AzureRmLoadBalancerFrontendIpConfigCommand.cs: add -EnableConnectionTracking switch.
  • Network.generated.format.ps1xml: add table columns for Mode and EnableConnectionTracking.
  • Help docs for the four affected cmdlets + ChangeLog.md.
  • Tests: Test-LoadBalancerAdvancedModeConnectionTracking (record/playback) + a live E2E scenario in LiveTests.

Testing

  • Module compiles cleanly (dotnet build src/Network/Network/Network.csproj).
  • Verified the new parameters/properties surface by importing the built module.
  • Draft: the new scenario test TestLoadBalancerAdvancedModeConnectionTracking still needs its SessionRecords/*.json captured against a live subscription (feature must be allowlisted in-region). Record with:
    Set-TestFxEnvironment -UserId <email> -SubscriptionId <sub> -TenantId <tenant> -RecorderMode "Record" then
    dotnet test src/Network/Network.Test --filter "FullyQualifiedName~TestLoadBalancerAdvancedModeConnectionTracking".

Checklist

  • ChangeLog.md updated under "Upcoming Release".
  • Help documentation updated.
  • Test recordings captured (pending live subscription).

…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>
@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

@EugenioPena
Eugenio Peña García (EugenioPena) marked this pull request as ready for review August 14, 2026 23:26
@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@wangzelin007

Copy link
Copy Markdown
Member

/azp run

@wangzelin007
ZelinWang (wangzelin007) requested a balanced review from Copilot August 17, 2026 01:32
@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants