hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.51k stars 4.6k forks source link

Feature request - MSIX remote application resource #15611

Open kylebavis opened 2 years ago

kylebavis commented 2 years ago

-- name: 🚀 Feature Request - MSIX remote application resource about: Add resource for MSIX applications in AVD and modify azurerm_virtual_desktop_application to support it title: Support for MSIX appattach in AVD


Community Note

Description

The feature implemented in #12077 added support for remote apps installed locally on AVD session hosts. It would be helpful to also be able to deploy MSIX remote apps.

New or Affected Resource(s)

azurerm_virtual_desktop_application azurerm_virtual_desktop_msix_package

Potential Terraform Configuration

resource "azurerm_virtual_desktop_application" "ra_myApp" {
  name                         = "appName"
  application_group_id         = azurerm_virtual_desktop_application_group.ag.id
  friendly_name                = "MSIX application"
  description                  = "it's deployed with AppAttach!"
  msix_package                 = azurerm_virtual_desktop_msix_package.msix_package.id
  show_in_portal               = true
  icon_path                    = "\\path-to-icon\icon.ico"
  icon_index                   = 1
}

resource "azurerm_virtual_desktop_msix_package" "msix_package" {
    image_path = "\\path-to-package\package.vhdx"
    host_pool_id = azurerm_virtual_desktop_host_pool.pool.id
}

References

ChrisTav424 commented 1 year ago

Are there any plans to add this?

rapster83 commented 12 months ago

Any updates?

2good4hisowngood commented 11 months ago

Issue Summary: The AzureRM provider in Terraform has extensive support for Azure Virtual Desktop (AVD) components. However, there is a notable omission: it does not currently support attaching MSIX packages to the AVD environment. This limitation hinders the full utilization of a semi-containerized testing environment that can be provided to development teams.

Use Case: Containerization of services, including web services, does not include/support Windows Desktop applications. MSIX offers a mechanism to virtualize Windows Desktop applications in a manner akin to containers. This would allow for the creation of intricate, customizable, ephemeral testing environments that can be elevated to production use.

The Vision: Imagine if we could:

  1. Dynamically spin up an AVD environment using Terraform components.
  2. Fetch the latest MSIX package from a continuous integration pipeline, and apply it to the app group. Use AzureAD to grant user permissions to access the desktop application once tf deploy is complete.
  3. Pair this with Azure Container Instances or an AKS cluster that, on deploy, retrieves container images from an Azure Container Registry, maintained by a container CI pipeline.
  4. Optionally, integrate a templated database for the application.

The end result would be an ephemeral, on-demand testing environment for applications that's tailored to the specific requirements. Extending this further, we could parameterize the entire setup, allowing internal teams to recreate a client's environment, or enabling sales teams to set up demo environments. Training teams could also have simulation labs that clients can launch.

Interim Solution: While we await further development on this front, one workaround might be leveraging PowerShell within Terraform with local-exec. You can potentially execute scripts mid-deployment in Terraform. This means after deploying the necessary resources, a script can be executed to add the MSIX package to a host pool. For more on this method, refer to Azure Virtual Desktop's App Attach via PowerShell.

I'll continue monitoring this issue closely and will return to provide more comprehensive details or solutions if the situation evolves. In the interim, I hope the community finds this guidance useful and am open to further suggestions or collaborative efforts.