fix(azure)!: migrate network cluster to new Azure SDK (batch 2/5)#1741
Open
james00012 wants to merge 3 commits intomainfrom
Open
fix(azure)!: migrate network cluster to new Azure SDK (batch 2/5)#1741james00012 wants to merge 3 commits intomainfrom
james00012 wants to merge 3 commits intomainfrom
Conversation
Migrate nsg, networkinterface, publicaddress, loadbalancer, and virtualnetwork modules from the deprecated azure-sdk-for-go v51 to azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6. Breaking changes: - Public return types changed (e.g. network.DefaultSecurityRulesClient → armnetwork.DefaultSecurityRulesClient) - Deprecated non-Context/non-E function variants removed - Property access paths changed (e.g. avs.VirtualMachines → resp.Properties.VirtualMachines) - safePtrToList signature changed from (*[]string) to ([]*string) Also: - Add getArmNetworkClientFactory() and new client creators (CreateLoadBalancerFrontendIPConfigClientE, CreateNetworkManagementClientE) - Replace old iterator pagination with NewListPager/More/NextPage pattern - Add unit tests for NSG rule collection using fake servers
Address review feedback from #1740 — adds tests for listVirtualMachineProperties, extractVMManagedDisks, extractVMOSDiskName, and extractVMSize.
The stubbed integration tests (behind build tags) still called removed deprecated functions and would fail to compile with -tags azure. Updated all network test stubs to use ContextE variants. Also fixed terraform_azure_nsg_example_test.go calling removed GetAllNSGRulesE.
4 tasks
james00012
added a commit
that referenced
this pull request
Apr 8, 2026
Complete the migration of all remaining Azure modules from the deprecated azure-sdk-for-go v51 to the actively maintained modular ARM SDK packages. Migrated services (batch 4): - containers → armcontainerinstance/v2, armcontainerregistry - aks → armcontainerservice/v6 - frontdoor → armfrontdoor - monitor/actiongroup → armmonitor - loganalytics → armoperationalinsights/v2 - privatednszone → armprivatedns - recoveryservices → armrecoveryservices/v2, armrecoveryservicesbackup/v4 - subscription → armsubscriptions - region, resourcegroup, resourcegroupv2 → armresources, armsubscriptions Cleanup (batch 5): - Remove authorizer.go (NewAuthorizer no longer needed) - Remove all old SDK imports from client_factory.go - Remove deprecated non-Context/non-E variants across all modules - Refactor all factory functions to use newArmCredential/newArmClientOptions - Delete deprecated wrapper functions (appService, keyvault, mysql, postgresql, sql, sql_managedinstance, container_apps, datafactory) Note: This PR includes changes from batches 2 (network) and 3 (data) since those PRs (#1741, #1742) haven't merged yet. After they merge, rebase this branch to shrink the diff to only batch 4+5 changes.
4 tasks
james00012
added a commit
that referenced
this pull request
Apr 8, 2026
Complete the migration of all remaining Azure modules from the deprecated azure-sdk-for-go v51 to the actively maintained modular ARM SDK packages. Migrated services (batch 4): - containers → armcontainerinstance/v2, armcontainerregistry - aks → armcontainerservice/v6 - frontdoor → armfrontdoor - monitor/actiongroup → armmonitor - loganalytics → armoperationalinsights/v2 - privatednszone → armprivatedns - recoveryservices → armrecoveryservices/v2, armrecoveryservicesbackup/v4 - subscription → armsubscriptions - region, resourcegroup, resourcegroupv2 → armresources, armsubscriptions Cleanup (batch 5): - Remove authorizer.go (NewAuthorizer no longer needed) - Remove all old SDK imports from client_factory.go - Remove deprecated non-Context/non-E variants across all modules - Refactor all factory functions to use newArmCredential/newArmClientOptions - Delete deprecated wrapper functions (appService, keyvault, mysql, postgresql, sql, sql_managedinstance, container_apps, datafactory) Note: This PR includes changes from batches 2 (network) and 3 (data) since those PRs (#1741, #1742) haven't merged yet. After they merge, rebase this branch to shrink the diff to only batch 4+5 changes.
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.
Summary
Second batch of the incremental Azure SDK migration. Migrates the network cluster from deprecated
azure-sdk-for-go v51toarmnetwork/v6.nsg.go,networkinterface.go,publicaddress.go,loadbalancer.go,virtualnetwork.gotoarmnetwork/v6getArmNetworkClientFactory()and new client creators (CreateLoadBalancerFrontendIPConfigClientE,CreateNetworkManagementClientE)safePtrToListincommon.gofrom(*[]string)to([]*string)to match new SDK conventionsNewListPager/More/NextPagepatternBreaking changes: public return types changed, property access paths changed,
safePtrToListsignature changed.Follows #1740 (batch 1: compute cluster).
Test plan
go build ./modules/azure/...passesgo test ./modules/azure/...— all unit tests passgolangci-lint run ./modules/azure/...— 0 issues-tags azure