1. Packages
  2. Azure Classic
  3. API Docs
  4. desktopvirtualization
  5. WorkspaceApplicationGroupAssociation

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.desktopvirtualization.WorkspaceApplicationGroupAssociation

Explore with Pulumi AI

Manages a Virtual Desktop Workspace Application Group Association.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "rg-example-virtualdesktop",
    location: "West Europe",
});
const pooledbreadthfirst = new azure.desktopvirtualization.HostPool("pooledbreadthfirst", {
    name: "pooledbreadthfirst",
    location: example.location,
    resourceGroupName: example.name,
    type: "Pooled",
    loadBalancerType: "BreadthFirst",
});
const remoteapp = new azure.desktopvirtualization.ApplicationGroup("remoteapp", {
    name: "remoteapp",
    location: example.location,
    resourceGroupName: example.name,
    type: "RemoteApp",
    hostPoolId: pooledbreadthfirst.id,
});
const workspace = new azure.desktopvirtualization.Workspace("workspace", {
    name: "workspace",
    location: example.location,
    resourceGroupName: example.name,
});
const workspaceremoteapp = new azure.desktopvirtualization.WorkspaceApplicationGroupAssociation("workspaceremoteapp", {
    workspaceId: workspace.id,
    applicationGroupId: remoteapp.id,
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="rg-example-virtualdesktop",
    location="West Europe")
pooledbreadthfirst = azure.desktopvirtualization.HostPool("pooledbreadthfirst",
    name="pooledbreadthfirst",
    location=example.location,
    resource_group_name=example.name,
    type="Pooled",
    load_balancer_type="BreadthFirst")
remoteapp = azure.desktopvirtualization.ApplicationGroup("remoteapp",
    name="remoteapp",
    location=example.location,
    resource_group_name=example.name,
    type="RemoteApp",
    host_pool_id=pooledbreadthfirst.id)
workspace = azure.desktopvirtualization.Workspace("workspace",
    name="workspace",
    location=example.location,
    resource_group_name=example.name)
workspaceremoteapp = azure.desktopvirtualization.WorkspaceApplicationGroupAssociation("workspaceremoteapp",
    workspace_id=workspace.id,
    application_group_id=remoteapp.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/desktopvirtualization"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("rg-example-virtualdesktop"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		pooledbreadthfirst, err := desktopvirtualization.NewHostPool(ctx, "pooledbreadthfirst", &desktopvirtualization.HostPoolArgs{
			Name:              pulumi.String("pooledbreadthfirst"),
			Location:          example.Location,
			ResourceGroupName: example.Name,
			Type:              pulumi.String("Pooled"),
			LoadBalancerType:  pulumi.String("BreadthFirst"),
		})
		if err != nil {
			return err
		}
		remoteapp, err := desktopvirtualization.NewApplicationGroup(ctx, "remoteapp", &desktopvirtualization.ApplicationGroupArgs{
			Name:              pulumi.String("remoteapp"),
			Location:          example.Location,
			ResourceGroupName: example.Name,
			Type:              pulumi.String("RemoteApp"),
			HostPoolId:        pooledbreadthfirst.ID(),
		})
		if err != nil {
			return err
		}
		workspace, err := desktopvirtualization.NewWorkspace(ctx, "workspace", &desktopvirtualization.WorkspaceArgs{
			Name:              pulumi.String("workspace"),
			Location:          example.Location,
			ResourceGroupName: example.Name,
		})
		if err != nil {
			return err
		}
		_, err = desktopvirtualization.NewWorkspaceApplicationGroupAssociation(ctx, "workspaceremoteapp", &desktopvirtualization.WorkspaceApplicationGroupAssociationArgs{
			WorkspaceId:        workspace.ID(),
			ApplicationGroupId: remoteapp.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "rg-example-virtualdesktop",
        Location = "West Europe",
    });

    var pooledbreadthfirst = new Azure.DesktopVirtualization.HostPool("pooledbreadthfirst", new()
    {
        Name = "pooledbreadthfirst",
        Location = example.Location,
        ResourceGroupName = example.Name,
        Type = "Pooled",
        LoadBalancerType = "BreadthFirst",
    });

    var remoteapp = new Azure.DesktopVirtualization.ApplicationGroup("remoteapp", new()
    {
        Name = "remoteapp",
        Location = example.Location,
        ResourceGroupName = example.Name,
        Type = "RemoteApp",
        HostPoolId = pooledbreadthfirst.Id,
    });

    var workspace = new Azure.DesktopVirtualization.Workspace("workspace", new()
    {
        Name = "workspace",
        Location = example.Location,
        ResourceGroupName = example.Name,
    });

    var workspaceremoteapp = new Azure.DesktopVirtualization.WorkspaceApplicationGroupAssociation("workspaceremoteapp", new()
    {
        WorkspaceId = workspace.Id,
        ApplicationGroupId = remoteapp.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.desktopvirtualization.HostPool;
import com.pulumi.azure.desktopvirtualization.HostPoolArgs;
import com.pulumi.azure.desktopvirtualization.ApplicationGroup;
import com.pulumi.azure.desktopvirtualization.ApplicationGroupArgs;
import com.pulumi.azure.desktopvirtualization.Workspace;
import com.pulumi.azure.desktopvirtualization.WorkspaceArgs;
import com.pulumi.azure.desktopvirtualization.WorkspaceApplicationGroupAssociation;
import com.pulumi.azure.desktopvirtualization.WorkspaceApplicationGroupAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("rg-example-virtualdesktop")
            .location("West Europe")
            .build());

        var pooledbreadthfirst = new HostPool("pooledbreadthfirst", HostPoolArgs.builder()
            .name("pooledbreadthfirst")
            .location(example.location())
            .resourceGroupName(example.name())
            .type("Pooled")
            .loadBalancerType("BreadthFirst")
            .build());

        var remoteapp = new ApplicationGroup("remoteapp", ApplicationGroupArgs.builder()
            .name("remoteapp")
            .location(example.location())
            .resourceGroupName(example.name())
            .type("RemoteApp")
            .hostPoolId(pooledbreadthfirst.id())
            .build());

        var workspace = new Workspace("workspace", WorkspaceArgs.builder()
            .name("workspace")
            .location(example.location())
            .resourceGroupName(example.name())
            .build());

        var workspaceremoteapp = new WorkspaceApplicationGroupAssociation("workspaceremoteapp", WorkspaceApplicationGroupAssociationArgs.builder()
            .workspaceId(workspace.id())
            .applicationGroupId(remoteapp.id())
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: rg-example-virtualdesktop
      location: West Europe
  pooledbreadthfirst:
    type: azure:desktopvirtualization:HostPool
    properties:
      name: pooledbreadthfirst
      location: ${example.location}
      resourceGroupName: ${example.name}
      type: Pooled
      loadBalancerType: BreadthFirst
  remoteapp:
    type: azure:desktopvirtualization:ApplicationGroup
    properties:
      name: remoteapp
      location: ${example.location}
      resourceGroupName: ${example.name}
      type: RemoteApp
      hostPoolId: ${pooledbreadthfirst.id}
  workspace:
    type: azure:desktopvirtualization:Workspace
    properties:
      name: workspace
      location: ${example.location}
      resourceGroupName: ${example.name}
  workspaceremoteapp:
    type: azure:desktopvirtualization:WorkspaceApplicationGroupAssociation
    properties:
      workspaceId: ${workspace.id}
      applicationGroupId: ${remoteapp.id}
Copy

Create WorkspaceApplicationGroupAssociation Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new WorkspaceApplicationGroupAssociation(name: string, args: WorkspaceApplicationGroupAssociationArgs, opts?: CustomResourceOptions);
@overload
def WorkspaceApplicationGroupAssociation(resource_name: str,
                                         args: WorkspaceApplicationGroupAssociationArgs,
                                         opts: Optional[ResourceOptions] = None)

@overload
def WorkspaceApplicationGroupAssociation(resource_name: str,
                                         opts: Optional[ResourceOptions] = None,
                                         application_group_id: Optional[str] = None,
                                         workspace_id: Optional[str] = None)
func NewWorkspaceApplicationGroupAssociation(ctx *Context, name string, args WorkspaceApplicationGroupAssociationArgs, opts ...ResourceOption) (*WorkspaceApplicationGroupAssociation, error)
public WorkspaceApplicationGroupAssociation(string name, WorkspaceApplicationGroupAssociationArgs args, CustomResourceOptions? opts = null)
public WorkspaceApplicationGroupAssociation(String name, WorkspaceApplicationGroupAssociationArgs args)
public WorkspaceApplicationGroupAssociation(String name, WorkspaceApplicationGroupAssociationArgs args, CustomResourceOptions options)
type: azure:desktopvirtualization:WorkspaceApplicationGroupAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. WorkspaceApplicationGroupAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. WorkspaceApplicationGroupAssociationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. WorkspaceApplicationGroupAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. WorkspaceApplicationGroupAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. WorkspaceApplicationGroupAssociationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var workspaceApplicationGroupAssociationResource = new Azure.DesktopVirtualization.WorkspaceApplicationGroupAssociation("workspaceApplicationGroupAssociationResource", new()
{
    ApplicationGroupId = "string",
    WorkspaceId = "string",
});
Copy
example, err := desktopvirtualization.NewWorkspaceApplicationGroupAssociation(ctx, "workspaceApplicationGroupAssociationResource", &desktopvirtualization.WorkspaceApplicationGroupAssociationArgs{
	ApplicationGroupId: pulumi.String("string"),
	WorkspaceId:        pulumi.String("string"),
})
Copy
var workspaceApplicationGroupAssociationResource = new WorkspaceApplicationGroupAssociation("workspaceApplicationGroupAssociationResource", WorkspaceApplicationGroupAssociationArgs.builder()
    .applicationGroupId("string")
    .workspaceId("string")
    .build());
Copy
workspace_application_group_association_resource = azure.desktopvirtualization.WorkspaceApplicationGroupAssociation("workspaceApplicationGroupAssociationResource",
    application_group_id="string",
    workspace_id="string")
Copy
const workspaceApplicationGroupAssociationResource = new azure.desktopvirtualization.WorkspaceApplicationGroupAssociation("workspaceApplicationGroupAssociationResource", {
    applicationGroupId: "string",
    workspaceId: "string",
});
Copy
type: azure:desktopvirtualization:WorkspaceApplicationGroupAssociation
properties:
    applicationGroupId: string
    workspaceId: string
Copy

WorkspaceApplicationGroupAssociation Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The WorkspaceApplicationGroupAssociation resource accepts the following input properties:

ApplicationGroupId
This property is required.
Changes to this property will trigger replacement.
string
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
WorkspaceId
This property is required.
Changes to this property will trigger replacement.
string
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
ApplicationGroupId
This property is required.
Changes to this property will trigger replacement.
string
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
WorkspaceId
This property is required.
Changes to this property will trigger replacement.
string
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
applicationGroupId
This property is required.
Changes to this property will trigger replacement.
String
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
workspaceId
This property is required.
Changes to this property will trigger replacement.
String
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
applicationGroupId
This property is required.
Changes to this property will trigger replacement.
string
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
workspaceId
This property is required.
Changes to this property will trigger replacement.
string
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
application_group_id
This property is required.
Changes to this property will trigger replacement.
str
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
workspace_id
This property is required.
Changes to this property will trigger replacement.
str
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
applicationGroupId
This property is required.
Changes to this property will trigger replacement.
String
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
workspaceId
This property is required.
Changes to this property will trigger replacement.
String
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the WorkspaceApplicationGroupAssociation resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing WorkspaceApplicationGroupAssociation Resource

Get an existing WorkspaceApplicationGroupAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: WorkspaceApplicationGroupAssociationState, opts?: CustomResourceOptions): WorkspaceApplicationGroupAssociation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        application_group_id: Optional[str] = None,
        workspace_id: Optional[str] = None) -> WorkspaceApplicationGroupAssociation
func GetWorkspaceApplicationGroupAssociation(ctx *Context, name string, id IDInput, state *WorkspaceApplicationGroupAssociationState, opts ...ResourceOption) (*WorkspaceApplicationGroupAssociation, error)
public static WorkspaceApplicationGroupAssociation Get(string name, Input<string> id, WorkspaceApplicationGroupAssociationState? state, CustomResourceOptions? opts = null)
public static WorkspaceApplicationGroupAssociation get(String name, Output<String> id, WorkspaceApplicationGroupAssociationState state, CustomResourceOptions options)
resources:  _:    type: azure:desktopvirtualization:WorkspaceApplicationGroupAssociation    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ApplicationGroupId Changes to this property will trigger replacement. string
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
WorkspaceId Changes to this property will trigger replacement. string
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
ApplicationGroupId Changes to this property will trigger replacement. string
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
WorkspaceId Changes to this property will trigger replacement. string
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
applicationGroupId Changes to this property will trigger replacement. String
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
workspaceId Changes to this property will trigger replacement. String
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
applicationGroupId Changes to this property will trigger replacement. string
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
workspaceId Changes to this property will trigger replacement. string
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
application_group_id Changes to this property will trigger replacement. str
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
workspace_id Changes to this property will trigger replacement. str
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
applicationGroupId Changes to this property will trigger replacement. String
The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
workspaceId Changes to this property will trigger replacement. String
The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.

Import

Associations between Virtual Desktop Workspaces and Virtual Desktop Application Groups can be imported using the resource id, e.g.

$ pulumi import azure:desktopvirtualization/workspaceApplicationGroupAssociation:WorkspaceApplicationGroupAssociation association1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/workspaces/myworkspace|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/myapplicationgroup"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.