Skip to content

feat: Merging the AVM WAF Changes from feature/avm-waf-aligned into dev #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 139 commits into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
5d21a0f
Infra - initial AVM update (WIP)
May 27, 2025
a2bfd27
AVM - initial bicep module updates to AVM
May 28, 2025
a3adf5d
AVM - removed modules, removed Owner assignment, moved sql role assig…
May 28, 2025
ada5d54
AVM - naming refactor, naming validation, new params, cosmos module
May 29, 2025
429805d
AVM - foundry module move and desc update
May 29, 2025
d7dcffe
AVM - removed unnecessary key vault entries, ai foundry refactoring
May 29, 2025
ba46485
initial network and nsgs
gailzmicrosoft May 29, 2025
4c85fe9
Merge branch 'feature/avm-waf-aligned' of https://github.com/microsof…
gailzmicrosoft May 29, 2025
68d72c6
AVM - waf-aligned monitoring
May 29, 2025
76cccd5
Merge branch 'feature/waf-monitoring' into feature/avm-waf-aligned
May 29, 2025
9bb1c60
WAF - removed duplicate storage accounts. added flags for scaling, re…
May 30, 2025
a86a7aa
WAF - cosmos redundancy and multi location
May 30, 2025
a70e8c5
basic structures set up
gailzmicrosoft May 30, 2025
3678d90
basic structure
gailzmicrosoft May 30, 2025
fac62d8
added security rules etc
gailzmicrosoft May 30, 2025
eb0e904
Merge branch 'feature/avm-waf-aligned' of https://github.com/microsof…
gailzmicrosoft May 30, 2025
f76c031
refactored
gailzmicrosoft May 31, 2025
ec02679
deleted extra file
gailzmicrosoft May 31, 2025
926d082
updated bastion and jumpbox
gailzmicrosoft May 31, 2025
0bba112
nsgs vnet with subnets created
gailzmicrosoft Jun 2, 2025
c18b734
law and network created and tested
gailzmicrosoft Jun 2, 2025
05d3196
deleted network and nsg code in moduoles subfolder
gailzmicrosoft Jun 2, 2025
45a4016
Added logical seperations
gailzmicrosoft Jun 2, 2025
e0890f8
Azure Bastion Host tested
gailzmicrosoft Jun 2, 2025
0beea81
all resources created - tested
gailzmicrosoft Jun 3, 2025
cdcbc4b
Keyvault - removed purged protection
Jun 3, 2025
f3187f0
Merge branch 'feature/avm-waf-aligned' of https://github.com/microsof…
Jun 3, 2025
394699f
Infra - removed abbr json
Jun 3, 2025
023369f
WAF - adding private networking options per resource - moved to modules
Jun 3, 2025
4fa91c0
WAF - private networking additions. other cleanup
Jun 3, 2025
230c8b1
seperated jumpbox and azure bastion host - tested
gailzmicrosoft Jun 3, 2025
2529430
Merge branch 'feature/avm-waf-aligned' of https://github.com/microsof…
gailzmicrosoft Jun 3, 2025
8da5d10
added comments
gailzmicrosoft Jun 3, 2025
d1803ea
refactored to modules tested
gailzmicrosoft Jun 3, 2025
a189952
naming consistency - tested
gailzmicrosoft Jun 4, 2025
92b7898
deleted jumpbox.bicep that is no longer used
gailzmicrosoft Jun 4, 2025
bb23ddd
new name schema for nic of the Jumpbox
gailzmicrosoft Jun 4, 2025
f18067e
Comments improved
gailzmicrosoft Jun 4, 2025
de9ff68
WAF - removed unnecessary flag check
Jun 4, 2025
1650119
Merge branch 'feature/avm-waf-aligned' of https://github.com/microsof…
Jun 4, 2025
c02e364
WAF - network integration into main (WIP)
Jun 4, 2025
20dba15
refactored network code tested
gailzmicrosoft Jun 4, 2025
38c58a8
deleted main_network.bicepparam
gailzmicrosoft Jun 4, 2025
ffa2a80
added networkConfig and simplified main.bicep
gailzmicrosoft Jun 4, 2025
a6d9375
comments updated only
gailzmicrosoft Jun 4, 2025
97be4bf
addtional comments
gailzmicrosoft Jun 4, 2025
de02ef7
make it consistent wit main.bicep
gailzmicrosoft Jun 4, 2025
acd94a6
WAF - network module refactor
Jun 5, 2025
ada77c9
WAF - network refactoring. network subnet fixes. api key workaround WIP
Jun 5, 2025
76053b0
WAF - network refactor and address updates
Jun 5, 2025
129398e
updated network design
gailzmicrosoft Jun 5, 2025
da06db3
WAF - storage sku fix, app env workload profiles
Jun 5, 2025
73fece6
WAF - azure.yaml cleanup, other minor cleanup
Jun 9, 2025
d76ce7b
WAF - Foundry project RBAC updates and temp removed AI Services priva…
Jun 9, 2025
ec75c64
updated security rules
gailzmicrosoft Jun 10, 2025
e567a27
Merge branch 'feature/avm-waf-aligned' of https://github.com/microsof…
gailzmicrosoft Jun 10, 2025
695b869
WAF - minor infra cleanup
Jun 10, 2025
b4f7bf6
Merge branch 'feature/avm-waf-aligned' of https://github.com/microsof…
Jun 10, 2025
021d92f
Backend App Env and App public access disabled
gailzmicrosoft Jun 10, 2025
a14705e
Merge branch 'feature/avm-waf-aligned' of https://github.com/microsof…
gailzmicrosoft Jun 10, 2025
b0122a8
nsg rule name for ai subnet is updated
gailzmicrosoft Jun 10, 2025
8881730
added nire comments
gailzmicrosoft Jun 10, 2025
bb26f00
updated network design
gailzmicrosoft Jun 10, 2025
3fef520
WAF - name adjustments for managed env resources
Jun 10, 2025
885201b
updated CIDR comments
gailzmicrosoft Jun 10, 2025
71f3fe6
updated CIDR table
gailzmicrosoft Jun 10, 2025
1946720
WAF - network role update and param cleanup
Jun 11, 2025
cb250d1
Merge branch 'feature/avm-waf-aligned' of https://github.com/microsof…
Jun 11, 2025
602fd5b
comments updated
gailzmicrosoft Jun 12, 2025
785bc80
added for testing network modules
gailzmicrosoft Jun 12, 2025
f57a00a
deleted
gailzmicrosoft Jun 12, 2025
5bd75c4
made it a true testing program
gailzmicrosoft Jun 12, 2025
f126806
deleted
gailzmicrosoft Jun 12, 2025
cc27b06
deleted Deployment_Plan.md
gailzmicrosoft Jun 12, 2025
904006e
reverted back to main.bicep prior
gailzmicrosoft Jun 12, 2025
e35542e
comment change only
gailzmicrosoft Jun 12, 2025
d90fded
rename and content update
gailzmicrosoft Jun 12, 2025
21fc125
comments update only
gailzmicrosoft Jun 12, 2025
6d1d94c
WAF - naming and infra cleanup. networking adjustments (WIP)
Jun 12, 2025
5c59389
Merge branch 'feature/avm-waf-aligned' of https://github.com/microsof…
Jun 12, 2025
75ee5ac
WAF - sln name update, networking param types
Jun 13, 2025
005a423
WAF - added telemetry flag. file cleanup
Jun 13, 2025
28819ff
WAF - naming cleanup
Jun 13, 2025
296a6eb
network_subnet_design completed and tested
gailzmicrosoft Jun 13, 2025
d4dcb49
addressPrefix: string? is no longer needed
gailzmicrosoft Jun 13, 2025
93492ca
deleted main.waf-aligned.bicepparam
gailzmicrosoft Jun 13, 2025
a15e914
added more output
gailzmicrosoft Jun 14, 2025
23d5609
Added comments for network policies setting
gailzmicrosoft Jun 14, 2025
8f6cb8b
added CIDR Guide
gailzmicrosoft Jun 16, 2025
c9c7b47
simplified the content
gailzmicrosoft Jun 16, 2025
1386275
simplifed
gailzmicrosoft Jun 18, 2025
fcb5815
main.bicep now has params: vmAdminUsername and vmAdminPassword
gailzmicrosoft Jun 18, 2025
adc2f6a
Merge pull request #137 from microsoft/gaiye-avm-waf
Roopan-Microsoft Jun 18, 2025
23ebdda
Made vmAdminUsername and vmAdminPassword optional
gailzmicrosoft Jun 19, 2025
4ed8831
Eliminated Ai Foundry Hub - Revise 1
gailzmicrosoft Jun 19, 2025
ae71c25
initial version
gailzmicrosoft Jun 19, 2025
a34b62f
initial version
gailzmicrosoft Jun 19, 2025
1cb63cc
syntax error correction
gailzmicrosoft Jun 20, 2025
be7da48
deployment with new aiservices tested
gailzmicrosoft Jun 20, 2025
eed9539
updated document
gailzmicrosoft Jun 20, 2025
c222633
image border reduced
gailzmicrosoft Jun 20, 2025
af81b45
review differences
gailzmicrosoft Jun 20, 2025
24a6a98
Set AI_PROJECT_ENDPOINT
gailzmicrosoft Jun 20, 2025
d6eb886
deleted temp files
gailzmicrosoft Jun 20, 2025
b2f15c8
minior line update
gailzmicrosoft Jun 20, 2025
36ac6d1
Updated Configurable Deployment Settings
gailzmicrosoft Jun 20, 2025
6153f4c
updated deployment setting config
gailzmicrosoft Jun 20, 2025
a469b39
deployment sucess JumpBox and Bastion Working
gailzmicrosoft Jun 21, 2025
0b6d860
capacity set to 100
gailzmicrosoft Jun 21, 2025
9169e31
removed sub section icons
gailzmicrosoft Jun 23, 2025
fad0ebc
name change to align with other GSAs
gailzmicrosoft Jun 23, 2025
65b13ff
comment out private end point for a quick test of AiServices
gailzmicrosoft Jun 23, 2025
4dd99c6
Test private end point code changes
gailzmicrosoft Jun 23, 2025
fb11c58
comment out waf params
gailzmicrosoft Jun 23, 2025
f7b9428
added comments
gailzmicrosoft Jun 23, 2025
643594d
EOD code upload
gailzmicrosoft Jun 23, 2025
b9c301c
added networkAcls
gailzmicrosoft Jun 23, 2025
1e6eb33
added networkAcls
gailzmicrosoft Jun 23, 2025
56e6036
Ai Foudry code updated and tested
gailzmicrosoft Jun 24, 2025
3d70285
set to sandbox config
gailzmicrosoft Jun 24, 2025
c0a7e44
comment update only
gailzmicrosoft Jun 24, 2025
6d68da1
Documentation Change only
gailzmicrosoft Jun 24, 2025
f699898
added app information flow
gailzmicrosoft Jun 24, 2025
180d0a3
minor text update
gailzmicrosoft Jun 24, 2025
42564c0
new waf param file
gailzmicrosoft Jun 24, 2025
a3f40cc
clean file
gailzmicrosoft Jun 24, 2025
55446ec
added header comment
gailzmicrosoft Jun 24, 2025
87e42b9
Added helpful warning on redundancy
gailzmicrosoft Jun 24, 2025
6c2610e
tested code
gailzmicrosoft Jun 24, 2025
198a409
clean file
gailzmicrosoft Jun 24, 2025
75b61d4
removed project, resource lock, custom managed key.
gailzmicrosoft Jun 24, 2025
0b322af
better format
gailzmicrosoft Jun 24, 2025
5fdc6e4
format update
gailzmicrosoft Jun 24, 2025
9a56de3
added comments
gailzmicrosoft Jun 24, 2025
602ff19
minor update on dependancy
gailzmicrosoft Jun 24, 2025
b5dd365
update parameter file name for WAF configuration
Abdul-Microsoft Jun 25, 2025
48e8a62
Merge pull request #144 from microsoft/gaiye-avm-waf
Roopan-Microsoft Jun 25, 2025
f78b5af
Merge remote-tracking branch 'origin/dev' into feature/avm-waf-aligned
Abdul-Microsoft Jun 25, 2025
e3226b3
Merge branch 'dev' into feature/avm-waf-aligned
Abdul-Microsoft Jun 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Modernize your code solution accelerator allows users to specify a group of
<br/>

<div align="center">

[**SOLUTION OVERVIEW**](#solution-overview) \| [**QUICK DEPLOY**](#quick-deploy) \| [**BUSINESS SCENARIO**](#business-scenario) \| [**SUPPORTING DOCUMENTATION**](#supporting-documentation)

</div>
Expand All @@ -24,7 +24,10 @@ The solution leverages Azure AI Foundry, Azure OpenAI Service, Azure Container A
|![image](./docs/images/read_me/solArchitecture.png)|
|---|

This architecture will be deployed with the 'sandbox' setting of our deployment process. Optionally you can deploy [Well-Architected Framework (WAF) aligned](https://learn.microsoft.com/en-us/azure/well-architected/) architecture, described in [WAF-Aligned Solution Architecture](./docs/ArchitectureWAF.md), with the WAF-Aligned deployment option described in [Deployment Guide](./docs/DeploymentGuide.md).

### Agentic architecture

|![image](./docs/images/read_me/agentArchitecture.png)|
|---|

Expand All @@ -51,16 +54,16 @@ If you'd like to customize the solution accelerator, here are some common areas
<summary>Click to learn more about the key features this solution enables</summary>

- **Code language modernization** <br/>
Modernizing outdated code ensures compatibility with current technologies, reduces reliance on legacy expertise, and keeps businesses competitive.
Modernizing outdated code ensures compatibility with current technologies, reduces reliance on legacy expertise, and keeps businesses competitive.

- **Summary and review of new code** <br/>
Generating summaries and translating code files keeps humans in the loop, enhances their understanding, and facilitates timely interventions, ensuring the files are ready to export.
Generating summaries and translating code files keeps humans in the loop, enhances their understanding, and facilitates timely interventions, ensuring the files are ready to export.

- **Business logic analysis** <br/>
Leveraging AI to decipher business logic from legacy code helps minimizes the risk of human error.
Leveraging AI to decipher business logic from legacy code helps minimizes the risk of human error.

- **Efficient code transformation** <br/>
Streamlining the process of analyzing, converting, and iterative error testing reduces time and effort required to modernize the systems.
Streamlining the process of analyzing, converting, and iterative error testing reduces time and effort required to modernize the systems.

</details>

Expand All @@ -77,7 +80,7 @@ Follow the quick deploy steps on the deployment guide to deploy this solution to

| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Modernize-your-Code-Solution-Accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Modernize-your-Code-Solution-Accelerator) |
|---|---|

<br/>

> ⚠️ **Important: Check Azure OpenAI Quota Availability**
Expand Down Expand Up @@ -141,19 +144,19 @@ The sample data used in this repository is synthetic and generated using Azure O
<summary>Click to learn more about what value this solution provides</summary>

- **Accelerated Migration** <br/>
Automate the translation of SQL queries, significantly reducing migration time and effort.
Automate the translation of SQL queries, significantly reducing migration time and effort.

- **Error Reduction** <br/>
Multi-agent validation ensures accurate translations and maintains data integrity.
Multi-agent validation ensures accurate translations and maintains data integrity.

- **Knowledge Preservation** <br/>
Captures and preserves business logic during the modernization process.
Captures and preserves business logic during the modernization process.

- **Cost Efficiency** <br/>
Reduces reliance on specialized legacy system expertise and manual translation efforts.
Reduces reliance on specialized legacy system expertise and manual translation efforts.

- **Standardization** <br/>
Ensures consistent query translation across the organization.
Ensures consistent query translation across the organization.

</details>

Expand Down
5 changes: 1 addition & 4 deletions azure.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
environment:
name: modernize-your-code-solution-accelerator
location: eastus
name: modernize-your-code-solution-accelerator
metadata:
template: modernize-your-code-solution-accelerator@1.0
Expand Down Expand Up @@ -36,4 +33,4 @@ hooks:
$location = if ($env:AZURE_AISERVICE_LOCATION) { $env:AZURE_AISERVICE_LOCATION } else { "japaneast" };
./scripts/validate_model_deployment_quota.ps1 -SubscriptionId $env:AZURE_SUBSCRIPTION_ID -Location $location -ModelsParameter "aiModelDeployments"
interactive: false
continueOnError: false
continueOnError: false
59 changes: 59 additions & 0 deletions docs/ArchitectureWAF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Azure WAF-Aligned Architecture

This architecture implements [Azure Well-Architected Framework (WAF)](https://learn.microsoft.com/en-us/azure/well-architected/) principles for enterprise-grade deployments, deployed with the WAF-Aligned deployment option:

![WAF-Aligned Architecture Diagram](../docs/images/read_me/solArchitectureWAF.png)

## WAF Pillars Implementation

### Security
- **Zero Trust Network:** Private VNet with private endpoints for all PaaS services
- **Identity & Access:** Managed identities with RBAC and least-privilege access
- **Secure Admin Access:** Azure Bastion + Jumpbox for internal administration
- **Secrets Management:** Azure Key Vault integration

### Operational Excellence
- **Observability:** Centralized logging via Log Analytics Workspace
- **Application Monitoring:** Application Insights for telemetry and diagnostics
- **Infrastructure as Code:** Bicep templates with parameterized configurations

### Performance Efficiency
- **Auto-scaling:** Container Apps with configurable scaling policies
- **Regional Proximity:** Resources deployed in optimal Azure regions

### Cost Optimization
- **Right-sizing:** Parameterized SKUs and capacity settings
- **Resource Sharing:** Shared networking and monitoring infrastructure

### Reliability
- **High Availability:** Multi-zone deployment options
- **Data Redundancy:** Configurable geo-replication for critical data stores
- **Private Connectivity:** Eliminates internet dependencies

## Core Architecture Components

| Component | Purpose | WAF Alignment |
|-----------|---------|---------------|
| **Virtual Network** | Network isolation boundary | Security, Reliability |
| **Private Endpoints** | Secure PaaS connectivity (AI Services, Storage, Cosmos DB, Key Vault) | Security |
| **Private DNS Zones** | Internal name resolution | Security, Reliability |
| **Azure Bastion + Jumpbox** | Secure administrative access | Security |
| **Container Apps** | Application hosting with VNet integration | Performance, Reliability |
| **Log Analytics + App Insights** | Centralized monitoring and diagnostics | Operational Excellence |

## Deployment Configuration
- **Parameter File:** `infra/main.waf-aligned.bicepparam` - Controls all WAF features
- **Network-first Design:** All components deployed within private network boundaries
- **Enterprise-ready:** Production-grade security and monitoring enabled

## Application Information Flow

The application information flow remains the same for both 'sandbox' and 'waf-aligned' configuration.

The solution is composed of several services:

- The web app front end and the backend app logic are containerized and run from Azure Container service instances.
- When a request for conversion is created in the web app admin console, the user specifies what files should be converted and the target SQL dialect for conversion.
- These files are then uploaded to blob storage and initial data about the request is stored in Cosmos DB.
- The conversion takes place using appropriate LLM models using multiple agents, with each agent having a dedicated purpose in the conversion process. As files are converted, they are placed into blob storage, with metadata collected into Cosmos detailing the conversion process and the current state of the batch.
- Cosmos also stores the logs from the individual agents so the results can be fully reviewed before any of the converted files are put into production.
Binary file added docs/CmsaArchitectureSource.pptx
Binary file not shown.
47 changes: 37 additions & 10 deletions docs/DeploymentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/g

| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Modernize-your-Code-Solution-Accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Modernize-your-Code-Solution-Accelerator) |
|---|---|

### **Configurable Deployment Settings**

When you start the deployment, most parameters will have **default values**, but you can update the following settings by following the steps [here](../docs/CustomizingAzdParameters.md):
Expand Down Expand Up @@ -61,7 +61,29 @@ By default, the **GPT model capacity** in deployment is set to **5k tokens**.

To adjust quota settings, follow these [steps](../docs/AzureGPTQuotaSettings.md)

### Deployment Options
### Deployment Options & Steps
### Sandbox or WAF Aligned Deployment Options

The [`infra`](../infra) folder contains the [`main.bicep`](../infra/main.bicep) Bicep script, which defines all Azure infrastructure components for this solution.

By default, the `azd up` command uses the [`main.bicepparam`](../infra/main.bicepparam) file to deploy the solution. This file is pre-configured for a **sandbox environment** — ideal for development and proof-of-concept scenarios, with minimal security and cost controls for rapid iteration.

For **production deployments**, the repository also provides [`main.waf-aligned.bicepparam`](../infra/main.waf-aligned.bicepparam), which applies a [WAF-aligned](https://learn.microsoft.com/en-us/azure/well-architected/) configuration. This option enables additional Azure best practices for reliability, security, cost optimization, operational excellence, and performance efficiency, such as:

- Enhanced network security (e.g., Network protection with private endpoints)
- Stricter access controls and managed identities
- Logging, monitoring, and diagnostics enabled by default
- Resource tagging and cost management recommendations

**How to choose your deployment configuration:**

- Use the default [`main.bicepparam`](../infra/main.bicepparam) for a sandbox/dev environment.
- For a WAF-aligned, production-ready deployment, copy the contents of [`main.waf-aligned.bicepparam`](../infra/main.waf-aligned.bicepparam) into `main.bicepparam` before running `azd up`.

> [!TIP]
> Always review and adjust parameter values (such as region, capacity, security settings and log analytics workspace configuration) to match your organization’s requirements before deploying. For production, ensure you have sufficient quota and follow the principle of least privilege for all identities and role assignments.


Pick from the options below to see step-by-step instructions for: GitHub Codespaces, VS Code Dev Containers, Local Environments, and Bicep deployments.

<details>
Expand Down Expand Up @@ -133,23 +155,28 @@ To change the azd parameters from the default values, follow the steps [here](..

1. Login to Azure:

```shell
azd auth login
```
```shell
azd auth login
```

#### Note: To authenticate with Azure Developer CLI (`azd`) to a specific tenant, use the previous command with your **Tenant ID**:

```sh
azd auth login --tenant-id <tenant-id>
```

#### Note: To authenticate with Azure Developer CLI (`azd`) to a specific tenant, use the previous command with your **Tenant ID**:
2. Provide an `azd` environment name (like "cmsaapp")

```sh
azd auth login --tenant-id <tenant-id>
```sh
azd env new <cmsaapp>
```

2. Provision and deploy all the resources:
3. Provision and deploy all the resources:

```shell
azd up
```

3. Provide an `azd` environment name (like "cmsaapp")
4. Select a subscription from your Azure account, and select a location which has quota for all the resources.
* This deployment will take *6-9 minutes* to provision the resources in your account and set up the solution with sample data.
* If you get an error or timeout with deployment, changing the location can help, as there may be availability constraints for the resources.
Expand Down
Binary file added docs/images/read_me/solArchitectureWAF.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading