Commit bf1fcda
Create Azure adapter: OperationalInsightsWorkspace (#4540)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Summary
Creates a new Azure adapter for `OperationalInsightsWorkspace` (Log
Analytics Workspace) resources.
## Changes
### New Files
- `sources/azure/clients/operational-insights-workspace-client.go` -
Client interface wrapping Azure SDK
-
`sources/azure/shared/mocks/mock_operational_insights_workspace_client.go`
- Generated mock client
- `sources/azure/manual/operational-insights-workspace.go` - Adapter
implementation using `ListableWrapper`
- `sources/azure/manual/operational-insights-workspace_test.go` - Unit
tests
-
`sources/azure/integration-tests/operational-insights-workspace_test.go`
- Integration tests
### Modified Files
- `sources/azure/shared/models.go` - Added `Insights` API, `Cluster` and
`PrivateLinkScopeScopedResource` resource constants
- `sources/azure/shared/item-types.go` - Added
`OperationalInsightsWorkspace`, `OperationalInsightsCluster`, and
`InsightsPrivateLinkScopeScopedResource` item types
- `sources/azure/manual/adapters.go` - Registered the new adapter
- `go.mod` / `go.sum` - Added `armoperationalinsights` SDK dependency
## Adapter Details
- **Type**: `ListableWrapper` (top-level resource scoped to resource
groups)
- **Category**: `ADAPTER_CATEGORY_OBSERVABILITY`
- **Health Mapping**: Maps `ProvisioningState` to SDP health status
- **Linked Items**:
- `OperationalInsightsCluster` - via
`Properties.Features.ClusterResourceID`
- `InsightsPrivateLinkScopeScopedResource` - via
`Properties.PrivateLinkScopedResources[].ResourceID` (using composite
lookup key for child resource)
- **IAM Permission**: `Microsoft.OperationalInsights/workspaces/read`
- **Predefined Role**: `Log Analytics Reader`
## Testing
- Unit tests cover Get, List, ListStream, error handling, health state
mapping, and cross-resource-group links
- Integration test creates actual Azure resources and verifies adapter
behavior (skips gracefully if service principal lacks permissions)
- All tests pass locally
<!-- CURSOR_AGENT_PR_BODY_END -->
Linear Issue:
[ENG-3550](https://linear.app/overmind/issue/ENG-3550/create-azure-adapter-operationalinsightsworkspace)
<div><a
href="https://cursor.com/agents/bc-061cf487-00ae-466f-932e-7aef5591cc06"><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-061cf487-00ae-466f-932e-7aef5591cc06"><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: 70d59ce34a023205779927eb148648f51f837eba1 parent 1833c86 commit bf1fcda
11 files changed
Lines changed: 1285 additions & 14 deletions
File tree
- sources/azure
- clients
- integration-tests
- manual
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| |||
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
Lines changed: 36 additions & 0 deletions
| 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 | + | |
| 36 | + | |
0 commit comments