From 32c962a6ffa43a0855e842599965da87fb395db6 Mon Sep 17 00:00:00 2001 From: Alex Wilcox Date: Tue, 14 Mar 2023 23:44:30 +0000 Subject: [PATCH] lb type can be dynamically changed --- .../desktopvirtualization/virtual_desktop_host_pool_resource.go | 1 - .../virtual_desktop_host_pool_resource_test.go | 2 +- website/docs/r/virtual_desktop_host_pool.html.markdown | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/services/desktopvirtualization/virtual_desktop_host_pool_resource.go b/internal/services/desktopvirtualization/virtual_desktop_host_pool_resource.go index 5a3f88938c9d2..68e3ffed9a253 100644 --- a/internal/services/desktopvirtualization/virtual_desktop_host_pool_resource.go +++ b/internal/services/desktopvirtualization/virtual_desktop_host_pool_resource.go @@ -71,7 +71,6 @@ func resourceVirtualDesktopHostPool() *pluginsdk.Resource { "load_balancer_type": { Type: pluginsdk.TypeString, Required: true, - ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ string(hostpool.LoadBalancerTypeBreadthFirst), string(hostpool.LoadBalancerTypeDepthFirst), diff --git a/internal/services/desktopvirtualization/virtual_desktop_host_pool_resource_test.go b/internal/services/desktopvirtualization/virtual_desktop_host_pool_resource_test.go index dc38087cf9eb9..ade772cdf52e8 100644 --- a/internal/services/desktopvirtualization/virtual_desktop_host_pool_resource_test.go +++ b/internal/services/desktopvirtualization/virtual_desktop_host_pool_resource_test.go @@ -245,7 +245,7 @@ resource "azurerm_virtual_desktop_host_pool" "test" { resource_group_name = azurerm_resource_group.test.name type = "Pooled" validate_environment = true - load_balancer_type = "BreadthFirst" + load_balancer_type = "DepthFirst" } `, data.RandomInteger, data.Locations.Secondary, data.RandomString) } diff --git a/website/docs/r/virtual_desktop_host_pool.html.markdown b/website/docs/r/virtual_desktop_host_pool.html.markdown index a17ccc7bb1b09..5807cb8c4b2cf 100644 --- a/website/docs/r/virtual_desktop_host_pool.html.markdown +++ b/website/docs/r/virtual_desktop_host_pool.html.markdown @@ -54,7 +54,7 @@ The following arguments are supported: * `type` - (Required) The type of the Virtual Desktop Host Pool. Valid options are `Personal` or `Pooled`. Changing the type forces a new resource to be created. -* `load_balancer_type` - (Required) `BreadthFirst` load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are `BreadthFirst`, `DepthFirst` and `Persistent`. Changing this forces a new resource to be created. +* `load_balancer_type` - (Required) `BreadthFirst` load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are `BreadthFirst`, `DepthFirst` and `Persistent`. `DepthFirst` load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold. `Persistent` should be used if the host pool type is `Personal`