Skip to content

Conversation

Prekshith-Microsoft
Copy link
Contributor

This pull request makes significant changes to how network security groups (NSGs) and subnet references are managed in the infrastructure Bicep codebase. The main update is the removal of explicit NSG module definitions and the transition to a new, consolidated virtualNetwork module that encapsulates subnet and NSG configuration. This change also updates all downstream modules to reference the new subnet output properties, improving clarity and maintainability.

Networking architecture simplification:

  • Removed explicit NSG module definitions (networkSecurityGroupBackend, networkSecurityGroupBastion, networkSecurityGroupAdministration, networkSecurityGroupContainers, networkSecurityGroupWebsite) from infra/main.bicep, consolidating NSG and subnet management into the new virtualNetwork module.
  • Replaced the use of the public AVM virtual network module with a custom modules/virtualNetwork.bicep module, which now handles subnet creation and NSG assignment internally.

Subnet output property updates:

  • Updated all references to subnets in downstream modules to use the new explicit output properties from the virtualNetwork module (e.g., backendSubnetResourceId, administrationSubnetResourceId, containerSubnetResourceId, webserverfarmSubnetResourceId) instead of array indices (e.g., subnetResourceIds[0]). This affects modules for VMs, AI services, Cosmos DB, Container Apps, Web Sites, Storage Accounts, and Key Vault. [1] [2] [3] [4] [5] [6] [7]

These changes improve the maintainability and readability of the infrastructure code by centralizing network configuration and using descriptive output properties for subnet references.## Purpose

  • ...

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@Prajwal-Microsoft Prajwal-Microsoft merged commit da55973 into dev-v3 Oct 17, 2025
4 checks passed
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.

2 participants