# 2.1.19

**Release Date:** October 23, 2025

---

## ✨ New Features

### Foundry Examples

#### Event Handling System with Cosmos DB 🎯

**Location:** `foundry/dotnet/events-with-cosmos/`

A comprehensive event handling solution demonstrating modern event-driven architecture patterns with Cosmos DB integration, Azure Function Apps, and Service Bus orchestration.

**Key Features:**

- ✅ **Complete Sample Solution** - Full foundry example with multiple projects demonstrating event processing patterns
- ✅ **Event API Endpoints** - New user events and policy events with comprehensive OpenAPI specifications
- ✅ **Service Bus Integration** - Event subscription triggers for complex event processing workflows
- ✅ **Data Models & Mappers** - BaseEntity, Event models, and transformation mappers for event handling

**Benefits:**

- 🚀 Simplified event-driven architecture implementation
- 🔄 Demonstrates both simple and complex event handling approaches
- 🎯 Complete end-to-end example for rapid development

**Projects Included:**

```text
Sample.sln
├── Sample.AppHost/           # Aspire hosting configuration
├── Sample/                   # Main API with event endpoints
├── Sample.Data/              # Cosmos DB context and models
├── Sample.Data.Seed/         # Database seeding utilities
├── Sample.Subscriptions/     # Azure Functions for event processing
└── Sample.ServiceBus.Seed/   # Service Bus setup and seeding
```

**Documentation:**

- [Event Subscription Guide](../guides/development/eventing/event-subscription.md)

---

### Terraform Modules

#### Function App Enhanced Networking 🌐

**Module:** `azure-compute/modules/functionapp_linux`

Enhanced networking capabilities for Azure Function Apps with virtual network integration and improved access controls.

**New Variables:**

- `virtual_network_subnet_id` (string, default: `null`) - Subnet ID for VNet integration
- `public_network_access_enabled` (bool, default: `true`) - Control public network access
- `outbound_ip_restriction_default_action` (string, default: `Allow`) - Default action for outbound traffic

**Example:**

```hcl
module "function_app" {
  source = "./modules/functionapp_linux"

  virtual_network_subnet_id           = azurerm_subnet.function_subnet.id
  public_network_access_enabled       = false
  outbound_ip_restriction_default_action = "Deny"
}
```

**Benefits:**

- ✅ Enhanced security with private networking
- ✅ Better control over Function App network access

---

### Aspire Hosting

#### Function App Reference Handling in CosmosDbResourceBuilder 📦

**Package:** `SAIF.Platform.Aspire.Hosting`

Enhanced CosmosDbResourceBuilder with optional function app parameter support and improved reference handling.

**New Method:**

```csharp
public static IResourceBuilder<CosmosDBServerResource> AddCosmosDb(
    this IDistributedApplicationBuilder builder,
    string name,
    int? port = null,
    string? connectionName = null,
    IResourceBuilder<AzureFunctionsProjectResource>? functionApp = null)
```

**Benefits:**

- 🚀 Simplified setup for Function Apps using Cosmos DB
- 🔄 Better resource dependency management in Aspire
- 🎯 Automatic configuration of connection strings

---

### Azure DevOps Integration

#### Enhanced Pipeline Path Triggers 🔧

**Templates:** All pipeline templates

Comprehensive PR path triggers for improved build efficiency and better resource utilization.

**Key Features:**

- ✅ **Component-specific triggers** - Dotnet packages trigger only on relevant changes
- ✅ **Terraform module triggers** - Module-specific path filters for targeted builds
- ✅ **TypeScript package triggers** - Focused builds for frontend packages
- ✅ **Template path triggers** - Project template changes trigger appropriate pipelines

**Benefits:**

- 🚀 Faster CI/CD pipelines with targeted builds
- 🔄 Reduced unnecessary pipeline runs
- 🎯 Better resource utilization in Azure DevOps

---

## 🔧 Enhancements

### Aspire Hosting

- ✅ **SAIF.Platform.Aspire.Hosting** - Improved function app reference handling in AddCosmosDb method

### Documentation

- ✅ **Platform Engineer Guidelines** - Enhanced guidelines and best practices for platform engineering
- ✅ **Create PR Workflow** - Updated workflow steps for improved developer experience
- ✅ **Settings and Secrets Guide** - Enhanced documentation for configuration management

---

## 🐛 Bug Fixes

### Azure DevOps

- 🐛 **Pipeline Templates** - Fixed branch reference in versioning configuration
- 🐛 **Pipeline Templates** - Removed unused secretsVariableGroupName parameter
- 🐛 **Versioning** - Updated patch version to 19 for consistency

### Foundry Examples

- 🐛 **Event Handling** - Updated debug endpoint for database connectivity check

### Terraform Modules

- 🐛 **Okta Business Roles** - Updated department rules for dynamic membership logic
- 🐛 **Entra ID Integration** - Fixed department rules for Entra ID group membership

### Documentation

- 🐛 **Security Configuration** - Clarified Business Roles are Okta/Entra groups, not AD groups
- 🐛 **App-to-App Config** - Fixed API-only examples and clarified user_groups.yml requirements

---

## 📚 Documentation

### New Documentation

- 📖 Security Configuration Guide (`guides/security/overview.md`) - Comprehensive security setup guide
- 📖 Event Handling System (`foundry/events-with-cosmos.md`) - Complete foundry example documentation

### Updated Documentation

- 📝 Platform Engineer Guidelines (`.github/instructions/general.instructions.md`) - Enhanced guidelines and best practices
- 📝 [Event Subscription Guide](../guides/development/eventing/event-subscription.md) - Expanded with new patterns and examples
- 📝 [Settings and Secrets](../guides/development/settings-and-secrets.md) - Added new configuration patterns
- 📝 Create PR Workflow (`.github/prompts/create-pr.prompt.md`) - Improved workflow steps and instructions

---

## 🔄 Breaking Changes

**None in this release** ✅

All changes in this release are backwards compatible.

---

## 📋 Additional Notes

- **Total commits:** 43
- **Files changed:** 141 files (4,108 additions, 516 deletions)
- **Contributors:** Jason Coria Corona Yue, Brian Sheridan, Emmitt Johnson, Platform Build Service

### Key Highlights

This release represents a significant step forward in event-driven architecture support with the introduction of a comprehensive foundry example demonstrating event handling patterns. The enhanced networking capabilities for Function Apps and improved Azure DevOps pipeline efficiency make this a substantial quality-of-life improvement for developers.

### Dependency Updates

- **TypeScript Dependencies:** Multiple OpenTelemetry packages updated to latest versions
- **ASP.NET Core Dependencies:** OpenTelemetry.Instrumentation.AspNetCore updated to v1.13.0
- **Vite:** Updated to v7.1.12 with bug fixes

---

### Support

- 📧 Teams Support Channel: [Support](https://teams.microsoft.com/l/channel/19%3Acb611810fb0b42b080cfff5590bdd51c%40thread.tacv2/Support?groupId=514d2dac-2d62-48ce-bf99-0fa0ce39469c&tenantId=a86cb8ed-369b-4df5-ace5-43811f6e08cf)

---
