A comprehensive collection of .NET 9 projects demonstrating Azure services end-to-end, including infrastructure (Bicep), application code, configuration, and documentation.
- One Solution: Single Visual Studio solution (
AzureIntegrationLab.sln) with all projects - Independent Projects: Each project is runnable locally and deployable to Azure
- Modern Stack: .NET 9, C# 12+, Azure SDKs, Managed Identity
- Production-Ready Patterns: DI, Options pattern, structured logging, retries
- Cost-Conscious: Smallest SKUs, free tiers where possible, explicit teardown
azure-dotnet-integration-lab/
βββ src/
β βββ Common/ # Shared utilities
β βββ 00-Auth-KeyVault/ # Entra ID + Key Vault
β βββ 01-Storage-Blob/ # Blob Storage
β βββ 02-Db-Cosmos/ # Cosmos DB
β βββ 03-Db-AzureSql-EFCore/ # Azure SQL + EF Core
β βββ 04-Messaging-ServiceBus/ # Service Bus
β βββ 05-Eventing-EventGrid/ # Event Grid (scaffolded)
β βββ 06-Streaming-EventHubs/ # Event Hubs (scaffolded)
β βββ 07-Serverless-Functions-ServiceBusTrigger/ # Azure Functions (scaffolded)
β βββ 08-Hosting-ContainerApps-MinimalApi/ # Container Apps (scaffolded)
β βββ 09-Observability-AppInsights-Otel/ # App Insights + OTel (scaffolded)
β βββ 10-ApiManagement-APIM/ # API Management (scaffolded)
β βββ 11-Caching-Redis/ # Redis Cache (scaffolded)
β βββ 12-Advanced-AKS-Keda-ServiceBus/ # AKS + KEDA (scaffolded, expensive!)
βββ infra/ # Shared infrastructure modules
βββ .github/workflows/ # CI/CD pipelines
βββ AzureIntegrationLab.sln # Visual Studio solution
| # | Project | Status | Description | Cost/Month |
|---|---|---|---|---|
| 00 | Auth-KeyVault | β Complete | Entra ID authentication + Key Vault secrets | $0 |
| 01 | Storage-Blob | β Complete | Blob upload/download/list/SAS | < $1 |
| 02 | Db-Cosmos | β Complete | Cosmos DB CRUD with partition keys | < $1 |
| 03 | Db-AzureSql-EFCore | β Complete | Azure SQL + EF Core + Migrations | ~$5 |
| 04 | Messaging-ServiceBus | β Complete | Service Bus sender/receiver | < $1 |
| 05 | Eventing-EventGrid | π§ Scaffolded | Event Grid webhook receiver | Free |
| 06 | Streaming-EventHubs | π§ Scaffolded | Event Hubs producer/consumer | < $1 |
| 07 | Serverless-Functions | π§ Scaffolded | Azure Functions + Service Bus | Free |
| 08 | ContainerApps | π§ Scaffolded | Container Apps deployment | < $5 |
| 09 | Observability-Otel | π§ Scaffolded | App Insights + OpenTelemetry | < $5 |
| 10 | ApiManagement-APIM | π§ Scaffolded | API Management policies | ~$3-50 |
| 11 | Caching-Redis | π§ Scaffolded | Redis cache-aside pattern | ~$15 |
| 12 | AKS-Keda | π§ Scaffolded | AKS + KEDA autoscaling |
Legend:
- β Complete: Fully implemented with code, infra, and docs
- π§ Scaffolded: Structure and README ready, implementation TODOs
git clone <repo-url>
cd azure-dotnet-integration-lab
dotnet restore
dotnet buildaz login
az account show # Verify your subscriptionEach project has its own deployment script. For example:
# Deploy project 00 (Key Vault)
cd src/00-Auth-KeyVault/infra
./deploy.sh dev # or deploy.ps1 on Windows
# Configure and run
cd ../..
dotnet run --project src/00-Auth-KeyVaultcd src/00-Auth-KeyVault/infra
./deploy.sh dev destroyEach project includes a detailed README with:
- Architecture diagram (Mermaid)
- Prerequisites
- Setup steps
- Run instructions
- Troubleshooting
- Cost considerations
Navigate to src/<project-name>/README.md for project-specific documentation.
All projects follow consistent patterns:
- Local:
DefaultAzureCredentialβ Azure CLI login - Deployed: Managed Identity (automatic)
appsettings.jsonfor defaults- Environment variables for overrides
dotnet user-secretsfor local secrets
- Structured logging with
ILogger<T> - Correlation IDs
- Log levels: Information, Warning, Error
- Exponential backoff
- Configurable retry counts
- Transient error handling
- Bicep templates for IaC
- RBAC for access control
- Consistent naming:
rg-ailab-<env>,kv-ailab-<rand>, etc.
- Choose a project from the table above
- Read the project README for specific instructions
- Deploy infrastructure using the project's
infra/scripts - Configure the app (appsettings.json or env vars)
- Run locally with
dotnet run - Test and verify functionality
- Teardown resources when done
- Free Tier: Used where available (Key Vault, Event Grid, Functions)
- Smallest SKUs: Basic/Standard tiers for development
- Serverless: Cosmos DB serverless, Functions Consumption
- Explicit Teardown: Always destroy resources after testing
- Cost Warnings: Project 12 (AKS) has significant costs
Estimated total cost for all projects (if all deployed simultaneously): ~$30-50/month
Recommended: Deploy one project at a time, test, then teardown before moving to the next.
This is a learning lab. Feel free to:
- Implement the scaffolded projects (05-12)
- Improve existing implementations
- Add new Azure service examples
- Fix bugs or improve documentation
This project is provided as-is for educational purposes.
- Azure .NET SDK Documentation
- Azure Bicep Documentation
- .NET 9 Documentation
- Azure Architecture Center
- Always teardown resources after testing to avoid unexpected costs
- Project 12 (AKS) is expensive (~$100+/month) - only deploy if needed
- Use separate resource groups per environment (dev, staging, prod)
- Review costs regularly in Azure Portal
- Follow security best practices - don't commit secrets
Authentication Errors
- Ensure
az loginis successful - Verify RBAC role assignments
- Check subscription permissions
Deployment Failures
- Verify resource name uniqueness
- Check quota limits
- Review Bicep template parameters
Connection Errors
- Verify firewall rules
- Check network connectivity
- Ensure managed identity is configured
See individual project READMEs for specific troubleshooting steps.
For issues or questions:
- Check the project-specific README
- Review Azure documentation
- Check Azure service status
- Open an issue in the repository
Happy Learning! π