Commit 2b7ff12
Create Azure adapter: NetworkPrivateLinkService (#4538)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Summary
This PR adds a new Azure adapter for Private Link Services
(`NetworkPrivateLinkService`). The adapter discovers Azure Private Link
Service resources and creates linked item queries to related resources.
## Changes
### New Files
- `sources/azure/clients/private-link-services-client.go` - Client
interface for Azure Private Link Services
- `sources/azure/shared/mocks/mock_private_link_services_client.go` -
Generated mock for testing
- `sources/azure/manual/network-private-link-service.go` - Adapter
implementation
- `sources/azure/manual/network-private-link-service_test.go` - Unit
tests
- `sources/azure/integration-tests/network-private-link-service_test.go`
- Integration tests
### Modified Files
- `sources/azure/manual/adapters.go` - Registration of the new adapter
## Linked Items
The adapter creates linked item queries to the following resource types:
| Linked Resource Type | Source Field | Method |
| --- | --- | --- |
| NetworkSubnet | IPConfigurations[].Properties.Subnet | GET |
| NetworkVirtualNetwork | (parent of subnet) | GET |
| NetworkLoadBalancerFrontendIPConfiguration |
LoadBalancerFrontendIPConfigurations | GET |
| NetworkLoadBalancer | (parent of frontend IP config) | GET |
| NetworkNetworkInterface | NetworkInterfaces | GET |
| NetworkPrivateEndpoint | PrivateEndpointConnections[].PrivateEndpoint
| GET |
| ExtendedLocationCustomLocation | ExtendedLocation.Name (when
customLocations) | GET |
| stdlib.NetworkIP | IPConfigurations[].Properties.PrivateIPAddress,
DestinationIPAddress | GET |
| stdlib.NetworkDNS | Fqdns, Alias | SEARCH |
## Health Status Mapping
Maps `ProvisioningState` to SDP health:
- `Succeeded` → HEALTH_OK
- `Creating`, `Updating`, `Deleting` → HEALTH_PENDING
- `Failed`, `Canceled` → HEALTH_ERROR
- Default → HEALTH_UNKNOWN
## Self-Review Checklist
- [x] **IAMPermissions**: Present, references
`Microsoft.Network/privateLinkServices/read`
- [x] **PredefinedRole**: Present, uses `Network Contributor`
- [x] **LinkedItemQueries**: 9 link types verified (Subnet,
VirtualNetwork, LoadBalancerFrontendIPConfiguration, LoadBalancer,
NetworkInterface, PrivateEndpoint, ExtendedLocationCustomLocation, IP,
DNS). DNS includes both Fqdns and Alias fields.
- [x] **PotentialLinks**: 9 types listed, matches LinkedItemQueries
- [x] **Unit tests**: All passing (Get, List, ListStream, StaticTests,
ErrorHandling, Get_EmptyName, List_WithNilName, PotentialLinks)
- [x] **Integration test**: All sub-tests passing (Setup, Run, Teardown)
against live Azure APIs
All checklist items passed. Ready for review.
## Related Issue
ENG-3552
<!-- CURSOR_AGENT_PR_BODY_END -->
Linear Issue:
[ENG-3552](https://linear.app/overmind/issue/ENG-3552/create-azure-adapter-networkprivatelinkservice)
<div><a
href="https://cursor.com/agents/bc-48fc0407-80ce-4546-a7d7-135b42dfe4ba"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-48fc0407-80ce-4546-a7d7-135b42dfe4ba"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Lionel Wilson <Lionel-Wilson@users.noreply.github.com>
GitOrigin-RevId: 62a0ffaa26a4afd7fa103668d183fb68148d129c1 parent df6c780 commit 2b7ff12
6 files changed
Lines changed: 1497 additions & 0 deletions
File tree
- sources/azure
- clients
- integration-tests
- manual
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments