# awslabs/resource-discovery-for-azure architecture

> Architecture diagram of the GitHub repository awslabs/resource-discovery-for-azure, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/awslabs/resource-discovery-for-azure
- Repository: https://github.com/awslabs/resource-discovery-for-azure

## Overview

This PowerShell tool inventories Azure subscriptions and produces consolidated HTML/JSON reports, including historical metrics. Its documented workflow starts with the all-subscriptions runner; optional sharing features include obfuscation and selective reveal. The README describes parallel execution and resumable runs, but no source excerpts were provided, so internal calls and state handling cannot be verified; domain collector links are therefore marked unverified.

Main entry points: [`ResourceInventory.ps1`](https://github.com/awslabs/resource-discovery-for-azure/blob/main/ResourceInventory.ps1) (Resource inventory), [`Run-AllSubscriptions.ps1`](https://github.com/awslabs/resource-discovery-for-azure/blob/main/Run-AllSubscriptions.ps1) (Subscription runner), [`Run-AllSubscriptions.Stream.ps1`](https://github.com/awslabs/resource-discovery-for-azure/blob/main/Run-AllSubscriptions.Stream.ps1) (Parallel runner), [`Services/Analytics`](https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Analytics) (Analytics services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_run["Run orchestration"]
  node_runner["Subscription runner"]
  node_stream["Parallel runner"]
end

subgraph group_collect["Azure inventory"]
  node_inventory["Resource inventory"]
  node_functions["Inventory functions"]
  node_analytics["Analytics services"]
  node_compute["Compute services"]
  node_containers["Container services"]
  node_data["Data services"]
  node_infrastructure["Infrastructure services"]
  node_integration["Integration services"]
  node_networking["Networking services"]
  node_storage["Storage services"]
  node_metrics["Historical metrics<br/>[Metrics.ps1]"]
end

subgraph group_report["Reports and sharing"]
  node_summary["HTML summary<br/>[Summary.ps1]"]
  node_zip["Consolidated report"]
  node_obfuscation["Obfuscation"]
  node_reveal["Selective reveal<br/>[Reveal.ps1]"]
end

node_user(("Operator"))
node_azure{{"Azure services"}}
node_monitor{{"Azure Monitor"}}

node_user -->|"runs"| node_runner
node_runner -->|"inventories subscriptions"| node_inventory
node_inventory -.->|"reads resources"| node_azure
node_inventory -.->|"may collect"| node_analytics
node_inventory -.->|"may collect"| node_compute
node_inventory -.->|"may collect"| node_containers
node_inventory -.->|"may collect"| node_data
node_inventory -.->|"may collect"| node_infrastructure
node_inventory -.->|"may collect"| node_integration
node_inventory -.->|"may collect"| node_networking
node_inventory -.->|"may collect"| node_storage
node_inventory -.->|"reads metrics"| node_monitor
node_runner -.->|"may parallelize"| node_stream
node_runner -->|"generates reports"| node_summary
node_runner -->|"produces archive"| node_zip
node_runner -->|"can mask details"| node_obfuscation
node_user -->|"runs selectively"| node_reveal

click node_runner "https://github.com/awslabs/resource-discovery-for-azure/blob/main/Run-AllSubscriptions.ps1"
click node_stream "https://github.com/awslabs/resource-discovery-for-azure/blob/main/Run-AllSubscriptions.Stream.ps1"
click node_inventory "https://github.com/awslabs/resource-discovery-for-azure/blob/main/ResourceInventory.ps1"
click node_functions "https://github.com/awslabs/resource-discovery-for-azure/tree/main/Functions"
click node_analytics "https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Analytics"
click node_compute "https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Compute"
click node_containers "https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Containers"
click node_data "https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Data"
click node_infrastructure "https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Infrastructure"
click node_integration "https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Integration"
click node_networking "https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Networking"
click node_storage "https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Storage"
click node_metrics "https://github.com/awslabs/resource-discovery-for-azure/blob/main/Extension/Metrics.ps1"
click node_summary "https://github.com/awslabs/resource-discovery-for-azure/blob/main/Extension/Summary.ps1"
click node_zip "https://github.com/awslabs/resource-discovery-for-azure/blob/main/Build-MainSummaryFromZip.ps1"
click node_obfuscation "https://github.com/awslabs/resource-discovery-for-azure/blob/main/Functions/RevealObfuscation.Functions.ps1"
click node_reveal "https://github.com/awslabs/resource-discovery-for-azure/blob/main/Reveal.ps1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runner,node_stream toneBlue
class node_inventory,node_functions,node_analytics,node_compute,node_containers,node_data,node_infrastructure,node_integration,node_networking,node_storage,node_metrics toneAmber
class node_summary,node_zip,node_obfuscation,node_reveal toneMint
class node_user,node_azure,node_monitor toneIndigo
```

## Components

### Run orchestration

- [Subscription runner](https://github.com/awslabs/resource-discovery-for-azure/blob/main/Run-AllSubscriptions.ps1): `Run-AllSubscriptions.ps1`
- [Parallel runner](https://github.com/awslabs/resource-discovery-for-azure/blob/main/Run-AllSubscriptions.Stream.ps1): `Run-AllSubscriptions.Stream.ps1`

### Azure inventory

- [Resource inventory](https://github.com/awslabs/resource-discovery-for-azure/blob/main/ResourceInventory.ps1): `ResourceInventory.ps1`
- [Inventory functions](https://github.com/awslabs/resource-discovery-for-azure/tree/main/Functions): `Functions`
- [Analytics services](https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Analytics): `Services/Analytics`
- [Compute services](https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Compute): `Services/Compute`
- [Container services](https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Containers): `Services/Containers`
- [Data services](https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Data): `Services/Data`
- [Infrastructure services](https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Infrastructure): `Services/Infrastructure`
- [Integration services](https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Integration): `Services/Integration`
- [Networking services](https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Networking): `Services/Networking`
- [Storage services](https://github.com/awslabs/resource-discovery-for-azure/tree/main/Services/Storage): `Services/Storage`
- [Historical metrics](https://github.com/awslabs/resource-discovery-for-azure/blob/main/Extension/Metrics.ps1): `Extension/Metrics.ps1`

### Reports and sharing

- [HTML summary](https://github.com/awslabs/resource-discovery-for-azure/blob/main/Extension/Summary.ps1): `Extension/Summary.ps1`
- [Consolidated report](https://github.com/awslabs/resource-discovery-for-azure/blob/main/Build-MainSummaryFromZip.ps1): `Build-MainSummaryFromZip.ps1`
- [Obfuscation](https://github.com/awslabs/resource-discovery-for-azure/blob/main/Functions/RevealObfuscation.Functions.ps1): `Functions/RevealObfuscation.Functions.ps1`
- [Selective reveal](https://github.com/awslabs/resource-discovery-for-azure/blob/main/Reveal.ps1): `Reveal.ps1`

### Other components

- **Operator**
- **Azure services**
- **Azure Monitor**

## Connections

- Operator → Subscription runner: runs (evidence: `README.md`)
- Subscription runner → Resource inventory: inventories subscriptions (evidence: `README.md`)
- Resource inventory → Azure services: reads resources
- Resource inventory → Analytics services: may collect
- Resource inventory → Compute services: may collect
- Resource inventory → Container services: may collect
- Resource inventory → Data services: may collect
- Resource inventory → Infrastructure services: may collect
- Resource inventory → Integration services: may collect
- Resource inventory → Networking services: may collect
- Resource inventory → Storage services: may collect
- Resource inventory → Azure Monitor: reads metrics
- Subscription runner → Parallel runner: may parallelize
- Subscription runner → HTML summary: generates reports (evidence: `README.md`)
- Subscription runner → Consolidated report: produces archive (evidence: `README.md`)
- Subscription runner → Obfuscation: can mask details (evidence: `README.md`)
- Operator → Selective reveal: runs selectively (evidence: `README.md`)
