Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ef3ead9
new bicep yaml
Dec 2, 2025
def79e4
Fix bicepparam decorators and enable workflow for current branch
Dec 3, 2025
601b37f
updated pipeline and added params
Dec 3, 2025
1717726
updated pipeline and added params
Dec 3, 2025
9116a1a
updated branch on yml
hemant4ml Dec 4, 2025
d962d4c
updated branch on yml
hemant4ml Dec 4, 2025
e895d2f
updated branch on yml
hemant4ml Dec 4, 2025
911ba8c
updated branch on yml
hemant4ml Dec 4, 2025
8fcd7bf
updated branch on yml
hemant4ml Dec 4, 2025
786f717
updated branch on yml
hemant4ml Dec 4, 2025
47c34e8
removed azd from yml
hemant4ml Dec 4, 2025
cf40532
removed azd from yml
hemant4ml Dec 4, 2025
312a0c1
removed azd from yml
hemant4ml Dec 4, 2025
52e593f
huge commit of modularized bicep files for ai foundry setup
hemant4ml Dec 4, 2025
e2b1a69
fix: use modularized template to avoid 4MB limit
hemant4ml Dec 4, 2025
ab1b437
fix: use modularized template to avoid 4MB limit
hemant4ml Dec 4, 2025
7f8f76f
fix: use modularized template to avoid 4MB limit
hemant4ml Dec 4, 2025
3e9ccf2
fix: replace main.bicep with modularized version to resolve 4MB template
hemant4ml Dec 4, 2025
41f5571
fix: update preprovision scripts to recursively update module referen…
hemant4ml Dec 4, 2025
0457d9f
fix: use parameters file from deploy directory to match template file…
hemant4ml Dec 4, 2025
82c75c1
feat: improve what-if output readability with summary artifact
hemant4ml Dec 4, 2025
4e97996
testing deployment
Dec 5, 2025
ffaa064
testing deployment
Dec 5, 2025
ae7aa20
Fix Bing output API version and Networking NSG empty ID issues
Dec 5, 2025
cb5d00d
Refactor subnet definitions to conditionally include NSG ID
Dec 5, 2025
fc11f52
Add Bicep install and build steps to debug auth timeout
Dec 5, 2025
a2f9ed4
Remove incorrect ACA delegation from agent-subnet
Dec 5, 2025
3553fb1
Add required NSG rules for AzureBastionSubnet
Dec 5, 2025
1452e37
Force update of Template Specs in preprovision script
Dec 5, 2025
c1eafd0
Disable Application Gateway deployment
Dec 5, 2025
9a22262
Fix Bastion Host wrapper and enable deployment
Dec 5, 2025
72b0890
adding founddry project
Dec 5, 2025
bdd2bd5
new kv name
Dec 5, 2025
c64b3eb
new sa name
Dec 5, 2025
c630259
new sa name
Dec 5, 2025
26b9017
fixed template for aifoundry
Dec 5, 2025
469603a
fixed another error
Dec 5, 2025
36f76f0
Fix Bicep warnings, update model to gpt-4o, and set unique baseName
Dec 5, 2025
26144be
Fix Bicep warnings, update model to gpt-4o, and set unique baseName
Dec 5, 2025
0c68541
updated params for bing search
Dec 16, 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
112 changes: 112 additions & 0 deletions .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Deploy AI Landing Zone-Bicep

on:
push:
branches:
- main
- newinitial
paths:
- 'bicep/infra/**'
- 'bicep/**'
- '.github/workflows/azure-dev.yml'

permissions:
id-token: write
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME || 'ai-landing-zone' }}
AZURE_LOCATION: ${{ vars.AZURE_LOCATION || 'swedencentral' }}
AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP || 'rg-aifoundry' }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Make scripts executable
run: chmod +x bicep/scripts/*.sh

- name: Log in to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Ensure Bicep is installed
run: |
az bicep install
az bicep version

- name: Run Pre-provision and What-If
run: |
# Run pre-provision script to generate templates
./bicep/scripts/preprovision.sh

# Verify auth and build (primes the cache and validates)
az account get-access-token --query "expiresOn"
az bicep build --file bicep/deploy/main.bicep

# Run What-If analysis and capture output
az deployment group what-if \
--resource-group "$AZURE_RESOURCE_GROUP" \
--template-file bicep/deploy/main.bicep \
--parameters bicep/deploy/main.bicepparam > what-if-raw.txt

# Create a clean summary for easy review
echo "WHAT-IF SUMMARY" > what-if-summary.txt
echo "===============" >> what-if-summary.txt
echo "" >> what-if-summary.txt

# Extract lines starting with +, -, or ~ (Create, Delete, Modify)
# Using grep to filter for lines with change indicators
grep -E "^[[:space:]]*[\+\-\~]" what-if-raw.txt >> what-if-summary.txt || echo "No changes detected." >> what-if-summary.txt

# Display summary in logs
cat what-if-summary.txt

- name: Upload What-If Results
uses: actions/upload-artifact@v4
with:
name: what-if-results
path: |
what-if-raw.txt
what-if-summary.txt

- name: Provision Infrastructure
id: provision
run: |
DEPLOYMENT_NAME="main-${{ github.run_id }}"
echo "DEPLOYMENT_NAME=$DEPLOYMENT_NAME" >> $GITHUB_ENV

az deployment group create \
--name "$DEPLOYMENT_NAME" \
--resource-group "$AZURE_RESOURCE_GROUP" \
--template-file bicep/deploy/main.bicep \
--parameters bicep/deploy/main.bicepparam \
--verbose

# Run post-provision script to cleanup
./bicep/scripts/postprovision.sh

- name: Get Deployment Errors
if: failure() && steps.provision.outcome == 'failure'
run: |
echo "Deployment failed. Fetching error details..."
az deployment group show \
--name "$DEPLOYMENT_NAME" \
--resource-group "$AZURE_RESOURCE_GROUP" \
--query properties.error \
--output json

echo "Fetching failed operations..."
az deployment operation group list \
--name "$DEPLOYMENT_NAME" \
--resource-group "$AZURE_RESOURCE_GROUP" \
--query "[?properties.provisioningState=='Failed']" \
--output json
200 changes: 200 additions & 0 deletions QUICK-REFERENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
# AI Landing Zone - Modular Bicep Quick Reference

## 📁 File Locations

```
bicep/infra/
├── main-modularized.bicep ⭐ NEW: Use this for deployments
├── main.bicep 📦 ORIGINAL: Keep as backup
└── modules/ ⭐ NEW: 9 dedicated modules
├── network-security.bicep
├── networking-core.bicep
├── private-dns-zones.bicep
├── observability.bicep
├── data-services.bicep
├── container-platform.bicep
├── private-endpoints.bicep
├── gateway-security.bicep
└── compute.bicep
```

## 🚀 Quick Commands

### Build Template
```powershell
az bicep build --file bicep/infra/main-modularized.bicep
```

### What-If Analysis
```powershell
az deployment group what-if `
--resource-group <rg-name> `
--template-file bicep/infra/main-modularized.bicep `
--parameters bicep/infra/main.bicepparam
```

### Deploy
```powershell
az deployment group create `
--resource-group <rg-name> `
--template-file bicep/infra/main-modularized.bicep `
--parameters bicep/infra/main.bicepparam `
--confirm-with-what-if
```

### Validate Single Module
```powershell
az bicep build --file bicep/infra/modules/<module-name>.bicep
```

## 📊 Module Overview

| # | Module | What It Does | Key Resources |
|---|--------|--------------|---------------|
| 1 | **network-security** | Security boundaries | 8 NSGs |
| 2 | **networking-core** | Network foundation | VNet, Public IPs, Peering |
| 3 | **private-dns-zones** | DNS resolution | 12 Private DNS Zones |
| 4 | **observability** | Monitoring | Log Analytics, App Insights |
| 5 | **data-services** | Data stores | Storage, Cosmos, KV, Search, Config |
| 6 | **container-platform** | Containers | ACR, Container Apps |
| 7 | **private-endpoints** | Private connectivity | 8 Private Endpoints |
| 8 | **gateway-security** | Edge security | App Gateway, Firewall |
| 9 | **compute** | Virtual machines | Build VM, Jump VM |

## 🔧 Common Tasks

### Modify a Specific Module
1. Edit: `bicep/infra/modules/<module-name>.bicep`
2. Build: `az bicep build --file bicep/infra/modules/<module-name>.bicep`
3. Test: Deploy to test environment
4. Commit changes

### Add New Resource to Module
1. Open module file
2. Add parameter (if needed)
3. Add resource/module call
4. Add output (if needed)
5. Validate with `az bicep build`

### Update Main Orchestration
1. Edit: `bicep/infra/main-modularized.bicep`
2. Update module call parameters
3. Wire outputs to other modules
4. Validate build

## 📝 Parameters (Unchanged)

All parameters from original `main.bicep` work exactly the same:

```bicep
param deployToggles deployTogglesType
param resourceIds resourceIdsType
param location string = resourceGroup().location
param baseName string = '...'
param tags object = {}
// ... and all service-specific parameters
```

## 📤 Outputs (Unchanged)

All outputs from original `main.bicep` are preserved:

- Network Security Group IDs
- Virtual Network ID
- Data Services IDs
- Container Platform IDs
- Gateway & Security IDs
- Compute IDs
- AI Foundry Project Name
- Bing Search IDs

## 🔄 Migration Status

| Item | Status |
|------|--------|
| Modularization | ✅ Complete |
| Build | ✅ No errors |
| Validation | ✅ Passed |
| Testing | ⏳ Pending |
| Production | ⏳ Pending |

## 📚 Documentation

| Document | Location | Purpose |
|----------|----------|---------|
| **Migration Summary** | `bicep/docs/modularization-summary.md` | Complete overview |
| **Quick Start** | `bicep/docs/quick-start-modular.md` | Developer guide |
| **Cut-Over Checklist** | `bicep/docs/cut-over-checklist.md` | Production deployment |
| **Integration Guide** | `bicep/docs/module-integration-guide.md` | Integration details |
| **Migration Complete** | `bicep/docs/migration-complete.md` | Final status |

## ⚡ Key Benefits

✅ **77% smaller** main file (739 vs 3,191 lines)
✅ **Faster** compilation and deployment
✅ **Easier** to maintain and understand
✅ **Modular** - reuse in other projects
✅ **Azure compliant** - under 4MB limit
✅ **Zero breaking changes**

## 🆘 Troubleshooting

### Build Error
```powershell
# Check specific module
az bicep build --file bicep/infra/modules/<failing-module>.bicep

# Check main file
az bicep build --file bicep/infra/main-modularized.bicep
```

### Deployment Error
```powershell
# Check deployment logs
az deployment group show `
--resource-group <rg-name> `
--name <deployment-name>

# Check What-If first
az deployment group what-if ... (see above)
```

### Missing Output
- Ensure module is not conditionally disabled
- Check if source resource was deployed
- Verify output wiring in main-modularized.bicep

## 👥 Team Workflow

### Developer
1. Edit specific module
2. Build & validate locally
3. Create PR with changes
4. Wait for CI/CD validation

### DevOps
1. Review PR changes
2. Run What-If in test
3. Deploy to test
4. Validate functionality
5. Approve for production

### Deployment
1. Use `main-modularized.bicep` (or `main.bicep` after cut-over)
2. Same parameters as before
3. Same deployment commands
4. Monitor deployment progress

## 🎯 Next Actions

1. **Test**: Deploy to test environment
2. **Validate**: Verify all resources work
3. **Document**: Add team-specific notes
4. **Train**: Share with team
5. **Deploy**: Cut over to production

---

**Version**: 1.0
**Last Updated**: December 4, 2025
**Status**: ✅ Ready for Testing
Loading