Open rmunilla opened 3 years ago
Thanks for opening this issue. I assume it's API limitation. WVD Hostpool API doesn't allow the name which is longer than 24. So I assume it's not terraform issue.
@neil-yechenwei could you please confirm whether the name of a hostpool can exceed 24 characters? If so this should be a swagger issue. The error reported in this issue is encoded in swagger and generated to SDK. Check the code here: https://github.com/terraform-providers/terraform-provider-azurerm/blob/9b9ee99dfb639132878f5cf37ce92bfd6d0e4b03/vendor/github.com/Azure/azure-sdk-for-go/services/preview/desktopvirtualization/mgmt/2019-12-10-preview/desktopvirtualization/hostpools.go#L252 Which is generated from the swagger here: https://github.com/Azure/azure-rest-api-specs/blob/51420e70ff2fbcc2443e76f389ef384a1adf1a89/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2019-12-10-preview/desktopvirtualization.json#L2957
@ArcturusZhang , after tested on Azure Portal, seems this resource could be created successfully with the name which is longer than 24. It's an swagger property validation issue. So I raised an issue on Azure/azure-rest-api-specs#11642.
Community Note
Description
Currently it is possible to create Windows Virtual Desktop Hostpools through Terraform but name must have length less than 24. In the portal and with pwsh it is possible to assign a name longer than 24.
Thanks for the amazing work!
Affected Resource(s)
azurerm_virtual_desktop_host_pool
Terraform Configuration Files
Debug Output
Expected Behavior
Host pool is created
Actual Behavior
Host pool is not created as it tries to refresh the state for the resource and name is longer than 24
Steps to Reproduce
terraform apply
Important Factoids
References
3507
8605