I have about 40 Azure Virtual Desktop nodes that are semi-ephemeral, meaning deletes/deployments happen frequently. Everything is handled by Terraform except for the final step of the deployment: Assigning the user designation.
I can do it in the Azure Portal, under the Hostpool > Session Hosts like so
And I can do it with Powershell like so
Update-AzWvdSessionHost -HostPoolName (HostPoolName) -Name (SessionHostName) -ResourceGroupName (ResourceGroupName) -AssignedUser (UserUPN)
Both of the above work great except that they aren’t part of the deployment. I could look at putting some Azure-authed powershell into my workspace (with a provider maybe?) but the fact that I can do it with Powershell at all tells me that the Azure API is open to it. So it seems like there ought to be a way to do this more directly via Terraform. I don’t have any TF output to share because I am striking out finding something to try. Thanks for any help!