Skip to content

feat (iac): [secure-hybrid-network] replace individual VMs with VMSS#262

Open
ferantivero wants to merge 7 commits into
mainfrom
feature/421252_sol-sec-net-hybrid-use-vmss
Open

feat (iac): [secure-hybrid-network] replace individual VMs with VMSS#262
ferantivero wants to merge 7 commits into
mainfrom
feature/421252_sol-sec-net-hybrid-use-vmss

Conversation

@ferantivero
Copy link
Copy Markdown
Contributor

@ferantivero ferantivero commented May 13, 2026

Why

Individual VMs via copy loops lack autoscaling, health monitoring, and rolling upgrades. VMSS is the recommended compute model for load-balanced workloads. The hub-spoke topology was also missing VNet peering, and VPN gateway non-AZ SKUs are deprecated since Dec 2024.

What

  • Remove NIC loop, VM loop, IIS extension loop, Guest Config extension loop
  • Add VMSS resource (Uniform orchestration) with extensions inline
  • Add hub-to-spoke VNet peering with allowGatewayTransit/useRemoteGateways
  • Upgrade VPN gateway from VpnGw2 to VpnGw2AZ with zone-redundant PIP (pickZones)
  • Rename windowsVMCount → webServerInstanceCount
  • Update architecture diagram
  • Fix Bicep compiler warnings (BCP318, BCP035)

Test

  • Bicep compiles without errors
  • Full e2e deployment succeeded
  • VMSS instances healthy, IIS serving HTTP 200
  • VPN tunnel established between hub and mock on-prem
  • Traffic flows through firewall DNAT to spoke workloads

ferantivero and others added 3 commits May 11, 2026 14:59
Remove the VM loop, NIC loop, IIS extension loop, and guest config
extension loop resources. These are being replaced by a VMSS in the
next commit.

- Remove nicNameWeb NIC resource loop
- Remove vmNameWeb VM resource loop
- Remove vmNameWeb_installIIS extension loop
- Remove guestConfigExtensionWindows extension loop
- Remove unused variables: nicNameWebName, vmNameWebName

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a single virtualMachineScaleSets resource that replaces the
previous VM and NIC loops with equivalent functionality:

- Uniform orchestration with Manual upgrade policy
- SystemAssigned identity for Guest Configuration
- computerNamePrefix 'websvr' (Windows 9-char limit)
- NIC config wired to spoke subnet and LB backend pool
- IIS CustomScriptExtension in extension profile
- Guest Configuration extension in extension profile

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ferantivero ferantivero force-pushed the feature/421252_sol-sec-net-hybrid-use-vmss branch from bef4389 to 962aa1d Compare May 13, 2026 14:34
ferantivero and others added 4 commits May 13, 2026 13:57
Better reflects VMSS semantics after the VM-to-VMSS migration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The hub and spoke VNets require peering for traffic to flow between
the VPN gateway and the spoke workloads. The JSON template already
had peering but the Bicep source (used for deployment) did not:

- Add hub-to-spoke peering with allowGatewayTransit
- Add spoke-to-hub peering with useRemoteGateways (when VPN enabled)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add properties: {} to gateway reference objects in connections

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Azure deprecated non-AZ VPN gateway SKUs (VpnGw1-5). Upgrade to
VpnGw2AZ and add required zones on associated public IPs.

- VpnGw2 → VpnGw2AZ in both hub and mock on-prem gateways
- Add zones: ['1', '2', '3'] to VPN gateway public IPs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ferantivero ferantivero changed the title feat (iac): [networking] replace individual VMs with VMSS feat (iac): [secure-hybrid-network] replace individual VMs with VMSS May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant