From ebe31dc197f1aa8601f08616ecd91920dd9b2605 Mon Sep 17 00:00:00 2001 From: "Andy.McCullough" Date: Mon, 15 Nov 2021 14:30:02 +0000 Subject: [PATCH] docs for new resource --- ..._host_pool_registration_info.html.markdown | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 website/docs/r/virtual_desktop_host_pool_registration_info.html.markdown diff --git a/website/docs/r/virtual_desktop_host_pool_registration_info.html.markdown b/website/docs/r/virtual_desktop_host_pool_registration_info.html.markdown new file mode 100644 index 000000000000..fb9c0ae6b800 --- /dev/null +++ b/website/docs/r/virtual_desktop_host_pool_registration_info.html.markdown @@ -0,0 +1,72 @@ +--- +subcategory: "Desktop Virtualization" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_virtual_desktop_host_pool_registration_info" +description: |- + Manages a Virtual Desktop Host Pool Registration Info. +--- + +# azurerm_virtual_desktop_host_pool_registration_info + +Manages a Virtual Desktop Host Pool Registration Info. + +~> **NOTE on Host Pools and Registration Info:** Terraform currently provides both a standalone [Virtual Desktop Host Pool Registration Info resource](virtual_desktop_host_pool_registration_info.html), and allows for a Registration_Info block to be defined in-line within the [Virtual Desktop Host Pool resource](virtual_desktop_host_pool.html). +At this time you cannot use a Host Pool with an in-line `registration_info` in conjunction with a Virtual Desktop Host Pool Registration Info resource. Doing so will cause a conflict of Host Pool configurations and will overwrite in-line registration info settings. +Use of the [Virtual Desktop Host Pool Registration Info resource](virtual_desktop_host_pool_registration_info.html) is recommended as the token value will be inconsistent when using the in-line `registration_info` block in the [Virtual Desktop Host Pool resource](virtual_desktop_host_pool.html). + +## Example Usage + +```hcl +resource "azurerm_resource_group" "example" { + name = "example-hostpool" + location = "westeurope" +} + +resource "azurerm_virtual_desktop_host_pool" "example" { + name = "example-HP" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + type = "Pooled" + validate_environment = true + load_balancer_type = "BreadthFirst" + +} + +resource "azurerm_virtual_desktop_host_pool_registration_info" "example" { + hostpool_id = azurerm_virtual_desktop_host_pool.example.id + expiration_date = timeadd(timestamp(), "48h") +} +``` + +## Arguments Reference + +The following arguments are supported: + +* `expiration_date` - (Required) A valid `RFC3339Time` for the expiration of the token.. + +* `hostpool_id` - (Required) The ID of the Virtual Desktop Host Pool to link the Registration Info to. Changing this forces a new Registration Info resource to be created. Only a single virtual_desktop_host_pool_registration_info resource should be associated with a given hostpool. Assigning multiple resources will produce inconsistent results. + +## Attributes Reference + +In addition to the Arguments listed above - the following Attributes are exported: + +* `id` - The ID of the Virtual Desktop Host Pool Registration Info resource. + +* `token` - The registration token generated by the Virtual Desktop Host Pool for registration of session hosts. + +## Timeouts + +The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions: + +* `create` - (Defaults to 1 hour) Used when creating the AVD Registration Info. +* `read` - (Defaults to 5 minutes) Used when retrieving the AVD Registration Info. +* `update` - (Defaults to 1 hour) Used when updating the AVD Registration Info. +* `delete` - (Defaults to 1 hour) Used when deleting the AVD Registration Info. + +## Import + +AVD Registration Infos can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_virtual_desktop_host_pool_registration_info.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DesktopVirtualization/hostPools/pool1/registrationInfo/default +``` \ No newline at end of file