Skip to content

azurermVirtualDesktopApplication

Manages a Virtual Desktop Application.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
  features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "rg-example-virtualdesktop",
  }
);
new azurerm.virtualDesktopHostPool.VirtualDesktopHostPool(
  this,
  "personalautomatic",
  {
    load_balancer_type: "BreadthFirst",
    location: azurermResourceGroupExample.location,
    name: "personalautomatic",
    personal_desktop_assignment_type: "Automatic",
    resource_group_name: azurermResourceGroupExample.name,
    type: "Personal",
  }
);
const azurermVirtualDesktopHostPoolPooledbreadthfirst =
  new azurerm.virtualDesktopHostPool.VirtualDesktopHostPool(
    this,
    "pooledbreadthfirst",
    {
      load_balancer_type: "BreadthFirst",
      location: azurermResourceGroupExample.location,
      name: "pooledbreadthfirst",
      resource_group_name: azurermResourceGroupExample.name,
      type: "Pooled",
    }
  );
const azurermVirtualDesktopApplicationGroupRemoteapp =
  new azurerm.virtualDesktopApplicationGroup.VirtualDesktopApplicationGroup(
    this,
    "remoteapp",
    {
      description: "Acceptance Test: An application group",
      friendly_name: "TestAppGroup",
      host_pool_id: azurermVirtualDesktopHostPoolPooledbreadthfirst.id,
      location: azurermResourceGroupExample.location,
      name: "acctag",
      resource_group_name: azurermResourceGroupExample.name,
      type: "RemoteApp",
    }
  );
new azurerm.virtualDesktopApplication.VirtualDesktopApplication(
  this,
  "chrome",
  {
    application_group_id: azurermVirtualDesktopApplicationGroupRemoteapp.id,
    command_line_argument_policy: "DoNotAllow",
    command_line_arguments: "--incognito",
    description: "Chromium based web browser",
    friendly_name: "Google Chrome",
    icon_index: 0,
    icon_path: "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
    name: "googlechrome",
    path: "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
    show_in_portal: false,
  }
);

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the Virtual Desktop Application. Changing the name forces a new resource to be created.

  • applicationGroupId - (Required) Resource ID for a Virtual Desktop Application Group to associate with the Virtual Desktop Application. Changing this forces a new resource to be created.

  • friendlyName - (Optional) Option to set a friendly name for the Virtual Desktop Application.

  • description - (Optional) Option to set a description for the Virtual Desktop Application.

  • path - (Required) The file path location of the app on the Virtual Desktop OS.

  • commandLineArgumentPolicy - (Required) Specifies whether this published application can be launched with command line arguments provided by the client, command line arguments specified at publish time, or no command line arguments at all. Possible values include: doNotAllow, allow, require.

  • commandLineArguments - (Optional) Command Line Arguments for Virtual Desktop Application.

  • showInPortal - (Optional) Specifies whether to show the RemoteApp program in the RD Web Access server.

  • iconPath - (Optional) Specifies the path for an icon which will be used for this Virtual Desktop Application.

  • iconIndex - (Optional) The index of the icon you wish to use.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Virtual Desktop Application.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 60 minutes) Used when creating the Virtual Desktop Application.
  • update - (Defaults to 60 minutes) Used when updating the Virtual Desktop Application.
  • read - (Defaults to 5 minutes) Used when retrieving the Virtual Desktop Application.
  • delete - (Defaults to 60 minutes) Used when deleting the Virtual Desktop Application.

Import

Virtual Desktop Application can be imported using the resourceId, e.g.

terraform import azurerm_virtual_desktop_application.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/myapplicationgroup/applications/myapplication