Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/hashicorp/setup-te…
Browse files Browse the repository at this point in the history
…rraform-3.1.2
  • Loading branch information
kyle-hoyer authored Aug 28, 2024
2 parents 499bdf1 + 843689f commit df02ccc
Show file tree
Hide file tree
Showing 2 changed files with 247 additions and 222 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ var pooledHostPool = (split(hostPoolType, ' ')[0] == 'Pooled')
var sessionHostNamePrefix = replace(virtualMachineNamePrefix, serviceToken, '')
var storageAccountToken = take('${storageAccountPrefix}??${uniqueToken}', 24)

resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2023-09-05' existing = {
name: hostPoolName
scope: resourceGroup(subscription().subscriptionId, resourceGroupControlPlane)
}

resource networkInterface 'Microsoft.Network/networkInterfaces@2020-05-01' = [for i in range(0, sessionHostCount): {
name: '${replace(networkInterfaceNamePrefix, '-${serviceToken}', '')}-${padLeft((i + sessionHostIndex), 4, '0')}'
location: location
Expand Down Expand Up @@ -324,7 +329,7 @@ resource extension_CustomScriptExtension 'Microsoft.Compute/virtualMachines/exte
timestamp: timestamp
}
protectedSettings: {
commandToExecute: 'powershell -ExecutionPolicy Unrestricted -File Set-SessionHostConfiguration.ps1 -activeDirectorySolution ${activeDirectorySolution} -amdVmSize ${amdVmSize} -avdAgentBootLoaderMsiName "${avdAgentBootLoaderMsiName}" -avdAgentMsiName "${avdAgentMsiName}" -Environment ${environment().name} -fslogix ${deployFslogix} -fslogixContainerType ${fslogixContainerType} -hostPoolName ${hostPoolName} -HostPoolRegistrationToken "${reference(resourceId(resourceGroupControlPlane, 'Microsoft.DesktopVirtualization/hostpools', hostPoolName), '2019-12-10-preview').registrationInfo.token}" -imageOffer ${imageOffer} -imagePublisher ${imagePublisher} -netAppFileShares ${netAppFileShares} -nvidiaVmSize ${nvidiaVmSize} -pooledHostPool ${pooledHostPool} -storageAccountPrefix ${storageAccountPrefix} -storageCount ${storageCount} -storageIndex ${storageIndex} -storageService ${storageService} -storageSuffix ${storageSuffix} -uniqueToken ${uniqueToken}'
commandToExecute: 'powershell -ExecutionPolicy Unrestricted -File Set-SessionHostConfiguration.ps1 -activeDirectorySolution ${activeDirectorySolution} -amdVmSize ${amdVmSize} -avdAgentBootLoaderMsiName "${avdAgentBootLoaderMsiName}" -avdAgentMsiName "${avdAgentMsiName}" -Environment ${environment().name} -fslogix ${deployFslogix} -fslogixContainerType ${fslogixContainerType} -hostPoolName ${hostPoolName} -HostPoolRegistrationToken "${hostPool.listRegistrationTokens().value[0].token}" -imageOffer ${imageOffer} -imagePublisher ${imagePublisher} -netAppFileShares ${netAppFileShares} -nvidiaVmSize ${nvidiaVmSize} -pooledHostPool ${pooledHostPool} -storageAccountPrefix ${storageAccountPrefix} -storageCount ${storageCount} -storageIndex ${storageIndex} -storageService ${storageService} -storageSuffix ${storageSuffix} -uniqueToken ${uniqueToken}'
managedidentity: {
clientId: artifactsUserAssignedIdentityClientId
}
Expand Down
Loading

0 comments on commit df02ccc

Please sign in to comment.