Skip to content

Commit

Permalink
docs for new resource
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy.McCullough committed Nov 15, 2021
1 parent acc17e6 commit ebe31dc
Showing 1 changed file with 72 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit ebe31dc

Please sign in to comment.