Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_virtual_desktop_host_pool - add custom_rdp_property #11160

Merged
merged 7 commits into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ func resourceVirtualDesktopHostPool() *schema.Resource {
Default: false,
},

"custom_rdp_properties": {
Type: schema.TypeString,
Optional: true,
},

"personal_desktop_assignment_type": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -196,6 +201,7 @@ func resourceVirtualDesktopHostPoolCreateUpdate(d *schema.ResourceData, meta int
FriendlyName: utils.String(d.Get("friendly_name").(string)),
Description: utils.String(d.Get("description").(string)),
ValidationEnvironment: utils.Bool(d.Get("validate_environment").(bool)),
CustomRdpProperty: utils.String(d.Get("custom_rdp_properties").(string)),
MaxSessionLimit: utils.Int32(int32(d.Get("maximum_sessions_allowed").(int))),
LoadBalancerType: desktopvirtualization.LoadBalancerType(d.Get("load_balancer_type").(string)),
PersonalDesktopAssignmentType: desktopvirtualization.PersonalDesktopAssignmentType(d.Get("personal_desktop_assignment_type").(string)),
Expand Down Expand Up @@ -254,6 +260,7 @@ func resourceVirtualDesktopHostPoolRead(d *schema.ResourceData, meta interface{}
d.Set("preferred_app_group_type", string(props.PreferredAppGroupType))
d.Set("type", string(props.HostPoolType))
d.Set("validate_environment", props.ValidationEnvironment)
d.Set("custom_rdp_properties", props.CustomRdpProperty)

if err := d.Set("registration_info", flattenVirtualDesktopHostPoolRegistrationInfo(props.RegistrationInfo)); err != nil {
return fmt.Errorf("setting `registration_info`: %+v", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ resource "azurerm_virtual_desktop_host_pool" "test" {
load_balancer_type = "BreadthFirst"
maximum_sessions_allowed = 100
preferred_app_group_type = "Desktop"
custom_rdp_properties = "audiocapturemode:i:1;audiomode:i:0;"

# Do not use timestamp() outside of testing due to https://github.com/hashicorp/terraform/issues/22461
registration_info {
Expand Down
5 changes: 4 additions & 1 deletion website/docs/r/virtual_desktop_host_pool.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ resource "azurerm_virtual_desktop_host_pool" "example" {
name = "pooleddepthfirst"
friendly_name = "pooleddepthfirst"
validate_environment = true
custom_rdp_properties = "audiocapturemode:i:1;audiomode:i:0;"
katbyte marked this conversation as resolved.
Show resolved Hide resolved
description = "Acceptance Test: A pooled host pool - pooleddepthfirst"
type = "Pooled"
maximum_sessions_allowed = 50
Expand Down Expand Up @@ -57,7 +58,9 @@ The following arguments are supported:

* `description` - (Optional) A description for the Virtual Desktop Host Pool.

* `validation_environment` - (Optional) Allows you to test service changes before they are deployed to production. Defaults to `false`.
* `validate_environment` - (Optional) Allows you to test service changes before they are deployed to production. Defaults to `false`.

* `custom_rdp_properties` - (Optional) A valid custom RDP properties string for the Virtual Desktop Host Pool, available properties can be [found in this article](https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/rdp-files).

* `personal_desktop_assignment_type` - (Optional) `Automatic` assignment – The service will select an available host and assign it to an user.
`Direct` Assignment – Admin selects a specific host to assign to an user.
Expand Down