terraform-provider-azurerm
terraform-provider-azurerm copied to clipboard
Support for azurerm_virtual_desktop_* data sources.
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
It is not currently possible to reference an azurerm_virtual_desktop_* resource as a data source. This prevents someone from, for example, creating diagnostic monitoring for an Azure Virtual Desktop Workspace using Terraform.
If you attempt to reference a azurerm_virtual_desktop_* resource as a data source, this naturally results in an error:
Invalid data source
on data_avd_workspaces.tf line 1, in data "azurerm_virtual_desktop_workspace" "example_workspace":
1: data "azurerm_virtual_desktop_workspace" "example_workspace" {
The provider provider.azurerm.example_subscription does not support data
source "azurerm_virtual_desktop_workspace".
New or Affected Resource(s)
data "azurerm_virtual_desktop_application" data "azurerm_virtual_desktop_application_group" data "azurerm_virtual_desktop_host_pool" data "azurerm_virtual_desktop_workspace"
Potential Terraform Configuration
data "azurerm_virtual_desktop_application" "example_application" {
name = "example_application"
resource_group_name = "example_resource_group"
}
data "azurerm_virtual_desktop_application_group" "example_application_group" {
name = "example_application_group"
resource_group_name = "example_resource_group"
}
data "azurerm_virtual_desktop_host_pool" "example_host_pool" {
name = "example_host_pool"
resource_group_name = "example_resource_group"
}
data "azurerm_virtual_desktop_workspace" "example_workspace" {
name = "example_workspace"
resource_group_name = "example_resource_group"
}
Expected properties to be exposed by these data sources would minimally include the resource's name and ID.
References
N/A
Hi,
I am having exactly the same "challenge" right now.
I created an AVD with hostpool, workspace and so on but, since we don't know yet the amount of instances that are going to be deployed, we were planning to create a pipeline with terraform vm code deployment and reference to an existing AVD/Hostpool, so as soon as a user requests a machine, that machine can be created and assigned automatically to the Hostpool.
Is this still not feasible to do? Is there any workaround discovered?
Hello, Any update on this one. The only way now is to import the host pool in your config but having a data source would make it easy to add news hosts in a already existing host pool.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.