Skip to content

Commit

Permalink
852 custom UI definition for avd to deploy arcgis pro hosts (#856)
Browse files Browse the repository at this point in the history
* Updated param name

* Added condition for empty param value

* Updated param name

* Updated param name, Simplified max session limit input

* Compiled bicep changes

* Added ArcGIS profile, Simplified inputs, Updated param name

* Added unique size inputs per profile for filtering

* Updated custom RDP properties with enhanced security

* Updated rdp properties with enhanced security
  • Loading branch information
jamasten authored Feb 12, 2024
1 parent 1d20a54 commit f379f37
Show file tree
Hide file tree
Showing 6 changed files with 1,690 additions and 1,632 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ resource workspace 'Microsoft.DesktopVirtualization/workspaces@2023-09-05' = if
tags: {}
properties: {
applicationGroupReferences: applicationGroupReferences
friendlyName: '${friendlyName} (${locationControlPlane})'
friendlyName: empty(friendlyName) ? hostPoolName : '${friendlyName} (${locationControlPlane})'
publicNetworkAccess: workspacePublicNetworkAccess
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ param domainJoinPassword string
param domainJoinUserPrincipalName string
param domainName string
param enableMonitoring bool
param environmentShortName string
param environmentAbbreviation string
param fslogix bool
param fslogixStorageService string
param hostPoolName string
Expand Down Expand Up @@ -189,7 +189,7 @@ module customerManagedKeys 'customerManagedKeys.bicep' = {
name: 'CustomerManagedKeys_${timestamp}'
scope: resourceGroup(resourceGroupManagement)
params: {
environment: environmentShortName
environment: environmentAbbreviation
keyVaultName: keyVaultName
keyVaultNetworkInterfaceName: keyVaultNetworkInterfaceName
keyVaultPrivateDnsZoneResourceId: keyVaultPrivateDnsZoneResourceId
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
targetScope = 'subscription'

param environmentShortName string
param environmentAbbreviation string
param identifier string
param locationControlPlane string
param locationVirtualMachines string
Expand All @@ -13,9 +13,9 @@ var resourceAbbreviation = 'resourceAbbreviation'
var serviceName = 'serviceName'
var networkName = 'avd'
var locationAbbreviation = 'locationAbbreviation'
var namingConvention = '${identifier}-${stampIndex}-${resourceAbbreviation}-${serviceName}-${networkName}-${environmentShortName}-${locationAbbreviation}'
var namingConvention_Global = '${resourceAbbreviation}-${serviceName}-${networkName}-${environmentShortName}-${locationAbbreviation}'
var namingConvention_Shared = '${identifier}-${resourceAbbreviation}-${serviceName}-${networkName}-${environmentShortName}-${locationAbbreviation}'
var namingConvention = '${identifier}-${stampIndex}-${resourceAbbreviation}-${serviceName}-${networkName}-${environmentAbbreviation}-${locationAbbreviation}'
var namingConvention_Global = '${resourceAbbreviation}-${serviceName}-${networkName}-${environmentAbbreviation}-${locationAbbreviation}'
var namingConvention_Shared = '${identifier}-${resourceAbbreviation}-${serviceName}-${networkName}-${environmentAbbreviation}-${locationAbbreviation}'

// SUPPORTING DATA
var cloudEndpointSuffix = replace(replace(environment().resourceManager, 'https://management.', ''), '/', '')
Expand Down Expand Up @@ -111,11 +111,11 @@ var routeTables = [
replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.routeTables), '-${serviceName}', ''), locationAbbreviation, locations[locationControlPlane].abbreviation)
replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.routeTables), '-${serviceName}', ''), locationAbbreviation, locations[locationVirtualMachines].abbreviation)
]
var storageAccountNamePrefix = replace(replace(replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.storageAccounts), '-${serviceName}', ''), locationAbbreviation, locations[locationVirtualMachines].abbreviation), environmentShortName, first(environmentShortName)), '-', '')
var storageAccountNetworkInterfaceNamePrefix = replace(replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.networkInterfaces), serviceName, resourceAbbreviations.storageAccounts), locationAbbreviation, locations[locationVirtualMachines].abbreviation), environmentShortName, first(environmentShortName))
var storageAccountPrivateEndpointNamePrefix = replace(replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.privateEndpoints), serviceName, resourceAbbreviations.storageAccounts), locationAbbreviation, locations[locationVirtualMachines].abbreviation), environmentShortName, first(environmentShortName))
var storageAccountNamePrefix = replace(replace(replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.storageAccounts), '-${serviceName}', ''), locationAbbreviation, locations[locationVirtualMachines].abbreviation), environmentAbbreviation, first(environmentAbbreviation)), '-', '')
var storageAccountNetworkInterfaceNamePrefix = replace(replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.networkInterfaces), serviceName, resourceAbbreviations.storageAccounts), locationAbbreviation, locations[locationVirtualMachines].abbreviation), environmentAbbreviation, first(environmentAbbreviation))
var storageAccountPrivateEndpointNamePrefix = replace(replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.privateEndpoints), serviceName, resourceAbbreviations.storageAccounts), locationAbbreviation, locations[locationVirtualMachines].abbreviation), environmentAbbreviation, first(environmentAbbreviation))
var userAssignedIdentityNamePrefix = replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.userAssignedIdentities), locationAbbreviation, locations[locationVirtualMachines].abbreviation)
var virtualMachineNamePrefix = replace(replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.virtualMachines), locationAbbreviation, locations[locationVirtualMachines].abbreviation), environmentShortName, first(environmentShortName)), '-', '')
var virtualMachineNamePrefix = replace(replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.virtualMachines), locationAbbreviation, locations[locationVirtualMachines].abbreviation), environmentAbbreviation, first(environmentAbbreviation)), '-', '')
var virtualNetworkNames = [
replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.virtualNetworks), '-${serviceName}', ''), locationAbbreviation, locations[locationControlPlane].abbreviation)
replace(replace(replace(namingConvention, resourceAbbreviation, resourceAbbreviations.virtualNetworks), '-${serviceName}', ''), locationAbbreviation, locations[locationVirtualMachines].abbreviation)
Expand Down
21 changes: 12 additions & 9 deletions src/bicep/add-ons/azureVirtualDesktop/solution.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ param azureNetAppFilesSubnetAddressPrefix string = ''
param azurePowerShellModuleMsiName string

@description('The RDP properties to add or remove RDP functionality on the AVD host pool. The string must end with a semi-colon. Settings reference: https://learn.microsoft.com/windows-server/remote/remote-desktop-services/clients/rdp-files')
param customRdpProperty string = 'audiocapturemode:i:1;camerastoredirect:s:*;use multimon:i:0;drivestoredirect:s:;'
param customRdpProperty string = 'audiocapturemode:i:1;camerastoredirect:s:*;use multimon:i:0;drivestoredirect:s:;encode redirected video capture:i:1;redirected video capture encoding quality:i:1;audiomode:i:0;devicestoredirect:s:;redirectclipboard:i:0;redirectcomports:i:0;redirectlocation:i:1;redirectprinters:i:0;redirectsmartcards:i:1;redirectwebauthn:i:1;usbdevicestoredirect:s:;keyboardhook:i:2;'

@description('The friendly name for the Desktop application in the desktop application group.')
param desktopFriendlyName string = ''
Expand Down Expand Up @@ -73,8 +73,8 @@ param drainMode bool = false
'prod' // Production
'test' // Test
])
@description('The short name for the target environment.')
param environmentShortName string = 'dev'
@description('The abbreviation for the target environment.')
param environmentAbbreviation string = 'dev'

@description('The file share size(s) in GB for the Fslogix storage solution.')
param fslogixShareSizeInGB int = 100
Expand Down Expand Up @@ -164,9 +164,6 @@ param logAnalyticsWorkspaceRetention int = 30
@description('The SKU for the Log Analytics Workspace to setup the AVD monitoring solution')
param logAnalyticsWorkspaceSku string = 'PerGB2018'

@description('The maximum number of sessions per AVD session host.')
param maxSessionLimit int

@description('Deploys the required monitoring resources to enable AVD Insights and monitor features in the automation account.')
param monitoring bool = true

Expand Down Expand Up @@ -234,9 +231,15 @@ param tags object = {}
@description('DO NOT MODIFY THIS VALUE! The timestamp is needed to differentiate deployments for certain Azure resources and must be set using a parameter.')
param timestamp string = utcNow('yyyyMMddhhmmss')

@description('The number of users per core is used to determine the maximum number of users per session host.')
param usersPerCore int = 1

@description('The validation environment setting on the AVD host pool determines whether the hostpool should receive AVD preview features for testing.')
param validationEnvironment bool = false

@description('The number of virtual CPUs per virtual machine for the selected virtual machine size.')
param virtualMachineVirtualCpuCount int

@allowed([
'AzureMonitorAgent'
'LogAnalyticsAgent'
Expand Down Expand Up @@ -281,7 +284,7 @@ var resourceGroupsCount = 4 + length(deploymentLocations) + (fslogixStorageServi
module resourceNames 'modules/resourceNames.bicep' = {
name: 'ResourceNames_${timestamp}'
params: {
environmentShortName: environmentShortName
environmentAbbreviation: environmentAbbreviation
identifier: identifier
locationControlPlane: locationControlPlane
locationVirtualMachines: locationVirtualMachines
Expand Down Expand Up @@ -400,7 +403,7 @@ module management 'modules/management/management.bicep' = {
domainJoinUserPrincipalName: domainJoinUserPrincipalName
domainName: domainName
enableMonitoring: monitoring
environmentShortName: environmentShortName
environmentAbbreviation: environmentAbbreviation
fslogix: logic.outputs.fslogix
fslogixStorageService: fslogixStorageService
hostPoolName: resourceNames.outputs.hostPoolName
Expand Down Expand Up @@ -490,7 +493,7 @@ module controlPlane 'modules/controlPlane/controlPlane.bicep' = {
locationVirtualMachines: locationVirtualMachines
logAnalyticsWorkspaceResourceId: monitoring ? management.outputs.logAnalyticsWorkspaceResourceId : ''
managementVirtualMachineName: management.outputs.virtualMachineName
maxSessionLimit: maxSessionLimit
maxSessionLimit: usersPerCore * virtualMachineVirtualCpuCount
monitoring: monitoring
resourceGroupControlPlane: resourceNames.outputs.resourceGroupControlPlane
resourceGroupFeedWorkspace: resourceNames.outputs.resourceGroupFeedWorkspace
Expand Down
Loading

0 comments on commit f379f37

Please sign in to comment.