Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Oct 16, 2025

Overview

This PR adds a configurable resource group topology feature to the AVD Landing Zone Accelerator, addressing the customer request for simplified resource group layouts while maintaining the Cloud Adoption Framework-aligned multi-RG topology as the default.

Problem Statement

Some customers prefer simpler resource group layouts for operations and compliance purposes. While the current multi-RG model follows Cloud Adoption Framework best practices with separate resource groups for service objects, compute, network, and storage, this adds operational complexity for teams managing smaller deployments or greenfield scenarios. Previously, customers had to manually move resources between resource groups post-deployment, as shown in the issue screenshot.

Solution

Added a new resourceGroupTopology parameter that allows users to choose between two deployment models:

1. MultiResourceGroup (Default - CAF Aligned)

  • Service Objects RG: AVD management plane (workspace, host pools, application groups)
  • Compute Objects RG: Session host VMs and related compute resources
  • Network Objects RG: Networking resources (VNets, NSGs, Route Tables, ASGs)
  • Storage Objects RG: Storage accounts for FSLogix profiles and App Attach

Benefits: Clear separation of concerns, granular RBAC, easier cost tracking, CAF aligned

2. SingleResourceGroup (Simplified)

  • All resources deployed to a single resource group
  • Ideal for dev/test environments or smaller production workloads
  • Simplifies operations and compliance for teams with simpler requirements

Implementation Details

Core Changes (deploy-baseline.bicep)

Added new parameters:

@allowed(['MultiResourceGroup', 'SingleResourceGroup'])
param resourceGroupTopology string = 'MultiResourceGroup' // Default maintains backward compatibility

param avdSingleResourceGroupCustomName string = 'rg-avd-app1-dev-use2'

Implemented conditional resource group logic:

// Single RG name variable
var varSingleResourceGroupName = avdUseCustomNaming
  ? avdSingleResourceGroupCustomName
  : 'rg-avd-${varComputeStorageResourcesNamingStandard}'

// All RG name variables check topology
var varServiceObjectsRgName = resourceGroupTopology == 'SingleResourceGroup'
  ? varSingleResourceGroupName
  : (avdUseCustomNaming ? avdServiceObjectsRgCustomName : 'rg-avd-...')

Conditional resource group deployments:

// Deploy single RG when topology is SingleResourceGroup
module singleResourceGroup '...' = if (resourceGroupTopology == 'SingleResourceGroup') { ... }

// Deploy multi RGs when topology is MultiResourceGroup  
module baselineNetworkResourceGroup '...' = if (resourceGroupTopology == 'MultiResourceGroup' && ...) { ... }

Usage Examples

PowerShell:

New-AzSubscriptionDeployment `
  -TemplateFile "./workload/bicep/deploy-baseline.bicep" `
  -resourceGroupTopology "SingleResourceGroup" `
  -avdWorkloadSubsId $SubID `
  # ... other parameters

Azure CLI:

az deployment sub create \
  --template-file "./workload/bicep/deploy-baseline.bicep" \
  --parameters resourceGroupTopology="SingleResourceGroup" \
  # ... other parameters

Documentation

  • Added comprehensive topology explanation to getting-started-baseline.md
  • Updated bicep/readme.md with usage examples for single RG topology
  • Created example parameter file (deploy-baseline-single-rg.bicepparam)
  • Created dedicated README for the example with PowerShell and Azure CLI usage

Testing & Validation

✅ Bicep linting passes with no new errors
✅ Backward compatibility verified (default is MultiResourceGroup)
✅ Logic validated with isolated test cases
✅ All file paths and references corrected
✅ Parameter documentation complete

Key Benefits

  • Flexibility: Choose topology based on organizational needs
  • Simplified Operations: Single RG reduces management overhead for smaller deployments
  • Backward Compatible: Existing deployments unaffected (default unchanged)
  • Minimal Changes: Surgical modifications (89 lines changed in main bicep file)
  • Well Documented: Comprehensive guides and examples included

Files Changed

  • workload/bicep/deploy-baseline.bicep - Core implementation (89 lines changed)
  • workload/bicep/parameters/deploy-baseline-all.bicepparam - Parameter updates
  • workload/docs/getting-started-baseline.md - Topology documentation
  • workload/bicep/readme.md - Usage examples
  • workload/bicep/parameters/deploy-baseline-single-rg.bicepparam - Example parameter file
  • workload/bicep/parameters/README-single-rg.md - Example usage guide
  • IMPLEMENTATION_SUMMARY.md - Comprehensive implementation details

Notes

  • Default behavior remains unchanged (MultiResourceGroup) ensuring backward compatibility
  • Customers can still manually move resources between RGs post-deployment using Azure's supported move operations
  • Custom naming is supported for single RG topology, consistent with existing naming features

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: bicep build workload/bicep/deploy-baseline.bicep (dns block)
    • Triggering command: bicep build workload/bicep/deploy-baseline.bicep --stdout (dns block)
    • Triggering command: bicep build-params deploy-baseline-single-rg.bicepparam --stdout (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Selectable Single 'Resource Group' Topology</issue_title>
<issue_description>### Describe the feature end to end, including deployment scenario details under which the feature would occur.

Provide an option in AVD LZA to either:

  • Deploy with the current Cloud Adoption Framework aligned multi resource group topology (service objects, pool compute, network, storage), OR
  • Deploy to a single Resource Group (for smaller/greenfield scenarios) OR
  • Automate a post deploy consolidation step using supported moves, where safe.

Why is this feature important. Describe why this would be important for your organization and others. Would this impact similar orgs in the same way?

Some customers prefer simpler RG layouts for operations/compliance. While the current multi RG model is by design using Cloud Adoption Framework, offering a configurable topology reduces friction for teams that need a consolidated Resource Group model.

Please provide the correlation id associated with your error or bug.

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Can you describe any alternatives that you have taken since this feature does not exist?

Manual moving of resources into one resource group after deployment.

Image

Feature Implementation

No code from our side; this is a product enhancement request to expose topology choice (or a safe consolidation routine).
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>

Fixes #836


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Add selectable single resource group topology option Add configurable resource group topology option for AVD deployments Oct 16, 2025
@Copilot Copilot AI requested a review from danycontre October 16, 2025 13:18
Copilot finished work on behalf of danycontre October 16, 2025 13:18
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.

Selectable Single 'Resource Group' Topology

2 participants