Azure / avdaccelerator

AVD Accelerator deployment automation to simplify the setup of AVD (Azure Virtual Desktop) based on best practices
MIT License
308 stars 201 forks source link

Azure vWAN - Support for peering the subnet to the vWAN #545

Closed OrionWithrow-OHIT closed 7 months ago

OrionWithrow-OHIT commented 8 months ago

Describe the feature end to end, including deployment scenario details under which the feature would occur.

Need to add support for adding the Virtual Network to a vWAN

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?

I cannot proceed with the code as it stands, as the domain join fails without Virtual Network peering. Requires creating a Virtual Network manually and peering prior to running the template

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?

No response

Feature Implementation

Added in Bicep:

@sys.description('Do we need to Connect our Virtual Network to a vWAN Virtual Hub? (Default: false)')
param peertovWanVirtualHub bool = false

@sys.description('The Name for the vWAN Hub in Connecticity Subscription')
param vWANHubName string

@sys.description('The Id for the Hub Connecticity Subscription that contains the vWAN')
param vWANSubscriptionId string

@sys.description('The Resource Group Name that contains the vWAN')
param vWANResourceGroupName string

@sys.description('The Connection Name that will be displayed in the vWAN')
param vWANConnectionName string

// Create a vWAN Hub Virtual Network Connection to Peer our AVD Virtual Network to the vWAN Hub
module hubVirtualNetworkConnection '../../_CARML/1.3.0/Microsoft.Network/virtualHubs/hubVirtualNetworkConnections/deploy.bicep' = if (peertovWanVirtualHub) {
    name: 'PeervWAN-${time}'
    scope: resourceGroup(vWANSubscriptionId, vWANResourceGroupName)
    params: {
        name: vWANConnectionName
        virtualHubName: vWANHubName
        remoteVirtualNetworkId: networking.outputs.virtualNetworkResourceId
    }
    dependsOn: [
        networking
    ]
}
moisesjgomez commented 8 months ago

@OrionWithrow-OHIT Thank you for submitting this enhancement. We are reviewing this. @swathibhat1 let's add this to our backlog.

danycontre commented 7 months ago

@OrionWithrow-OHIT closing this issue, we will work on this feature request in our internal backlog.

Thank you for your feedback.