Azure Desktop Virtualization Workspace
This page shows how to write Terraform and Azure Resource Manager for Desktop Virtualization Workspace and write them securely.
azurerm_virtual_desktop_workspace (Terraform)
The Workspace in Desktop Virtualization can be configured in Terraform with the resource name azurerm_virtual_desktop_workspace. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_virtual_desktop_workspace" "workspace" {
name = var.workspace.name
location = azurerm_resource_group.workspace.location
resource_group_name = azurerm_resource_group.workspace.name
}
resource "azurerm_virtual_desktop_workspace" "workspace" {
name = var.workspace
location = var.region
resource_group_name = azurerm_resource_group.default.name
friendly_name = var.workspacefriendlyname
resource "azurerm_virtual_desktop_workspace" "workspace" {
name = var.workspace
location = var.region
resource_group_name = var.rgname
friendly_name = var.workspacefriendlyname
description = var.workspacedesc
resource "azurerm_virtual_desktop_workspace" "workspace" {
name = "workspace"
location = azurerm_resource_group.arg.location
resource_group_name = azurerm_resource_group.arg.name
friendly_name = "Bastion Desktop"
description = "A description of my workspace"
resource "azurerm_virtual_desktop_workspace" "workspace" {
name = "workspace"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
}
resource "azurerm_virtual_desktop_workspace" "workspace" {
name = var.wkspacename
location = var.location
resource_group_name = azurerm_resource_group.wvdwks.name
friendly_name = var.wkspacename
resource "azurerm_virtual_desktop_workspace" "wvdws" {
name = azurecaf_name.wvdws.result
location = var.location
resource_group_name = var.resource_group_name
friendly_name = try(var.settings.friendly_name, null)
resource "azurerm_virtual_desktop_workspace" "workspace" {
name = var.wkspacename
location = var.location
resource_group_name = var.resourcename
friendly_name = var.wkspacename
resource "azurerm_virtual_desktop_workspace" "wvdws" {
name = azurecaf_name.wvdws.result
location = var.location
resource_group_name = var.resource_group_name
friendly_name = try(var.settings.friendly_name, null)
resource "azurerm_virtual_desktop_workspace" "workspace" {
name = var.wkspace-name
location = azurerm_resource_group.wvdrg.location
resource_group_name = azurerm_resource_group.wvdrg.name
friendly_name = var.wkspace-name
Parameters
-
descriptionoptional - string -
friendly_nameoptional - string -
idoptional computed - string -
locationrequired - string -
namerequired - string -
resource_group_namerequired - string -
tagsoptional - map from string to string -
timeoutssingle block
Explanation in Terraform Registry
Manages a Virtual Desktop Workspace.
Microsoft.DesktopVirtualization/workspaces (Azure Resource Manager)
The workspaces in Microsoft.DesktopVirtualization can be configured in Azure Resource Manager with the resource name Microsoft.DesktopVirtualization/workspaces. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
"type": "Microsoft.DesktopVirtualization/workspaces",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
"properties": {
"friendlyName": "[parameters('workspaceName')]",
"description": "[parameters('workspaceDescription')]",
"type": "Microsoft.DesktopVirtualization/workspaces",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
"properties": {
"friendlyName": "[parameters('workspaceName')]",
"description": "[parameters('workspaceDescription')]",
Parameters
apiVersionrequired - stringidentityoptionaltypeoptional - stringThe identity type.
kindoptional - stringMetadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
locationoptional - stringThe geo-location where the resource lives
managedByoptional - stringThe fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
namerequired - stringThe name of the workspace
planoptionalnamerequired - stringA user defined name of the 3rd Party Artifact that is being procured.
productrequired - stringThe 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding.
promotionCodeoptional - stringA publisher provided promotion code as provisioned in Data Market for the said product/artifact.
publisherrequired - stringThe publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic
versionoptional - stringThe version of the desired product/artifact.
propertiesrequiredapplicationGroupReferencesoptional - arrayList of applicationGroup resource Ids.
descriptionoptional - stringDescription of Workspace.
friendlyNameoptional - stringFriendly name of Workspace.
skuoptionalcapacityoptional - integerIf the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.
familyoptional - stringIf the service has different generations of hardware, for the same SKU, then that can be captured here.
namerequired - stringThe name of the SKU. Ex - P3. It is typically a letter+number code
sizeoptional - stringThe SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.
tieroptional - stringThis field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.
tagsoptional - stringResource tags.
typerequired - string
Frequently asked questions
What is Azure Desktop Virtualization Workspace?
Azure Desktop Virtualization Workspace is a resource for Desktop Virtualization of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Desktop Virtualization Workspace?
For Terraform, the yaegashi/wvd-terraform, deanl1982/TF-Create-AVDHP-Using-Vars and diogofrj/Hashicorp source code examples are useful. See the Terraform Example section for further details.
For Azure Resource Manager, the mariuszdotnet/azure-image-builder-wvd and tylerd/azure-wvd-template-spec source code examples are useful. See the Azure Resource Manager Example section for further details.