Azure / terraform-azurerm-avm-ptn-avd-lza-managementplane

Azure Virtual Desktop Landing Zone Accelerator Management Plane
https://registry.terraform.io/modules/Azure/avm-ptn-avd-lza-managementplane/azurerm/latest
MIT License
3 stars 3 forks source link
avd avm-platform azure azurevirtualdesktop desktopvirtualization virtualization

terraform-azurerm-avm-ptn-avd-lza-managementplane

This is a repo for Terraform Azure Verified Module for Azure Virtual Desktop

Features

Requirements

The following requirements are needed by this module:

Providers

The following providers are used by this module:

Resources

The following resources are used by this module:

Required Inputs

The following input variables are required:

location

Description: (Required) The location/region where the Azure Virtual Desktop resources are located. Changing this forces a new resource to be created.

Type: string

log_analytics_workspace_name

Description: The name of the Log Analytics Workspace to use for diagnostics.

Type: string

resource_group_name

Description: The name of the resource group in which the AVD Private Endpoint should be created.

Type: string

user_group_name

Description: Microsoft Entra ID User Group for AVD users

Type: string

virtual_desktop_application_group_name

Description: (Required) The name of the Virtual Desktop Application Group. Changing the name forces a new resource to be created.

Type: string

virtual_desktop_application_group_type

Description: (Required) Type of Virtual Desktop Application Group. Valid options are RemoteApp or Desktop application groups. Changing this forces a new resource to be created.

Type: string

virtual_desktop_host_pool_load_balancer_type

Description: (Required) BreadthFirst load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are BreadthFirst, DepthFirst and Persistent. DepthFirst load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold. Persistent should be used if the host pool type is Personal

Type: string

virtual_desktop_host_pool_name

Description: (Required) The name of the Virtual Desktop Host Pool. Changing this forces a new resource to be created.

Type: string

virtual_desktop_host_pool_type

Description: (Required) The type of the Virtual Desktop Host Pool. Valid options are Personal or Pooled. Changing the type forces a new resource to be created.

Type: string

virtual_desktop_scaling_plan_name

Description: (Required) The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.

Type: string

virtual_desktop_scaling_plan_time_zone

Description: (Required) Specifies the Time Zone which should be used by the Scaling Plan for time based events, the possible values are defined here.

Type: string

virtual_desktop_workspace_name

Description: (Required) The name of the Virtual Desktop Workspace. Changing this forces a new resource to be created.

Type: string

Optional Inputs

The following input variables are optional (have default values):

enable_telemetry

Description: This variable controls whether or not telemetry is enabled for the module.

For more information see https://aka.ms/avm/telemetryinfo.

If it is set to false, then no telemetry will be collected.

Type: bool

Default: true

managed_identities

Description: Controls the Managed Identity configuration on this resource. The following properties can be specified:

Type:

object({
    system_assigned            = optional(bool, false)
    user_assigned_resource_ids = optional(set(string), [])
  })

Default: {}

private_endpoints

Description: A map of private endpoints to create on the resource. The map key is deliberately arbitrary to avoid issues where map keys maybe unknown at plan time.

Type:

map(object({
    name = optional(string, null)
    role_assignments = optional(map(object({
      role_definition_id_or_name             = string
      principal_id                           = string
      description                            = optional(string, null)
      skip_service_principal_aad_check       = optional(bool, false)
      condition                              = optional(string, null)
      condition_version                      = optional(string, null)
      delegated_managed_identity_resource_id = optional(string, null)
      principal_type                         = optional(string, null)
    })), {})
    lock = optional(object({
      name = optional(string, null)
      kind = string
    }), null)
    tags                                    = optional(map(string), null)
    subnet_resource_id                      = string
    private_dns_zone_group_name             = optional(string, "default")
    private_dns_zone_resource_ids           = optional(set(string), [])
    application_security_group_associations = optional(map(string), {})
    private_service_connection_name         = optional(string, null)
    network_interface_name                  = optional(string, null)
    location                                = optional(string, null)
    resource_group_name                     = optional(string, null)
    ip_configurations = optional(map(object({
      name               = string
      private_ip_address = string
    })), {})
  }))

Default: {}

public_network_access_enabled

Description: Whether or not public network access is enabled for the AVD Workspace.

Type: bool

Default: true

registration_expiration_period

Description: The expiration period for the registration token. Must be less than or equal to 30 days.

Type: string

Default: "48h"

role_assignments

Description: A map of role assignments to create on the resource. The map key is deliberately arbitrary to avoid issues where map keys maybe unknown at plan time.

Type:

map(object({
    role_definition_id_or_name             = string
    principal_id                           = string
    description                            = optional(string, null)
    skip_service_principal_aad_check       = optional(bool, false)
    condition                              = optional(string, null)
    condition_version                      = optional(string, null)
    delegated_managed_identity_resource_id = optional(string, null)
    principal_type                         = optional(string, null)
  }))

Default: {}

schedules

Description: A map of schedules to create on AVD Scaling Plan. The map key is deliberately arbitrary to avoid issues where map keys maybe unknown at plan time.

Type:

map(object({
    name                                 = string
    days_of_week                         = set(string)
    off_peak_start_time                  = string
    off_peak_load_balancing_algorithm    = string
    ramp_down_capacity_threshold_percent = number
    ramp_down_force_logoff_users         = bool
    ramp_down_load_balancing_algorithm   = string
    ramp_down_minimum_hosts_percent      = number
    ramp_down_notification_message       = string
    ramp_down_start_time                 = string
    ramp_down_stop_hosts_when            = string
    ramp_down_wait_time_minutes          = number
    peak_start_time                      = string
    peak_load_balancing_algorithm        = string
    ramp_up_capacity_threshold_percent   = optional(number)
    ramp_up_load_balancing_algorithm     = string
    ramp_up_minimum_hosts_percent        = optional(number)
    ramp_up_start_time                   = string
  }))

Default:

{
  "schedule1": {
    "days_of_week": [
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday"
    ],
    "name": "Weekdays",
    "off_peak_load_balancing_algorithm": "DepthFirst",
    "off_peak_start_time": "22:00",
    "peak_load_balancing_algorithm": "BreadthFirst",
    "peak_start_time": "09:00",
    "ramp_down_capacity_threshold_percent": 5,
    "ramp_down_force_logoff_users": false,
    "ramp_down_load_balancing_algorithm": "DepthFirst",
    "ramp_down_minimum_hosts_percent": 10,
    "ramp_down_notification_message": "Please log off in the next 45 minutes...",
    "ramp_down_start_time": "19:00",
    "ramp_down_stop_hosts_when": "ZeroSessions",
    "ramp_down_wait_time_minutes": 45,
    "ramp_up_capacity_threshold_percent": 10,
    "ramp_up_load_balancing_algorithm": "BreadthFirst",
    "ramp_up_minimum_hosts_percent": 20,
    "ramp_up_start_time": "05:00"
  }
}

subresource_names

Description: The names of the subresources to assosciatied with the private endpoint. The target subresource must be one of: 'feed', or 'global'.

Type: list(string)

Default: []

tags

Description: (Optional) Tags of the resource.

Type: map(string)

Default: null

time_zone

Description: The time zone of the AVD Scaling Plan.

Type: string

Default: "Eastern Standard Time"

tracing_tags_enabled

Description: Whether enable tracing tags that generated by BridgeCrew Yor.

Type: bool

Default: false

tracing_tags_prefix

Description: Default prefix for generated tracing tags

Type: string

Default: "avm_"

virtual_desktop_application_group_default_desktop_display_name

Description: (Optional) Option to set the display name for the default sessionDesktop desktop when type is set to Desktop.

Type: string

Default: null

virtual_desktop_application_group_description

Description: (Optional) Option to set a description for the Virtual Desktop Application Group.

Type: string

Default: null

virtual_desktop_application_group_friendly_name

Description: (Optional) Option to set a friendly name for the Virtual Desktop Application Group.

Type: string

Default: null

virtual_desktop_application_group_tags

Description: (Optional) A mapping of tags to assign to the resource.

Type: map(string)

Default: null

virtual_desktop_application_group_timeouts

Description: - create - (Defaults to 60 minutes) Used when creating the Virtual Desktop Application Group.

Type:

object({
    create = optional(string)
    delete = optional(string)
    read   = optional(string)
    update = optional(string)
  })

Default: null

virtual_desktop_host_pool_custom_rdp_properties

Description: (Optional) A valid custom RDP properties string for the Virtual Desktop Host Pool, available properties can be found in this article.

Type: string

Default: "drivestoredirect:s:*;audiomode:i:0;videoplaybackmode:i:1;redirectclipboard:i:1;redirectprinters:i:1;devicestoredirect:s:*;redirectcomports:i:1;redirectsmartcards:i:1;usbdevicestoredirect:s:*;enablecredsspsupport:i:1;use multimon:i:0"

virtual_desktop_host_pool_description

Description: (Optional) A description for the Virtual Desktop Host Pool.

Type: string

Default: null

virtual_desktop_host_pool_friendly_name

Description: (Optional) A friendly name for the Virtual Desktop Host Pool.

Type: string

Default: null

virtual_desktop_host_pool_maximum_sessions_allowed

Description: (Optional) A valid integer value from 0 to 999999 for the maximum number of users that have concurrent sessions on a session host. Should only be set if the type of your Virtual Desktop Host Pool is Pooled.

Type: number

Default: null

virtual_desktop_host_pool_personal_desktop_assignment_type

Description: (Optional) Automatic assignment

Type: string

Default: null

virtual_desktop_host_pool_preferred_app_group_type

Description: Preferred App Group type to display

Type: string

Default: null

virtual_desktop_host_pool_scheduled_agent_updates

Description: - enabled - (Optional) Enables or disables scheduled updates of the AVD agent components (RDAgent, Geneva Monitoring agent, and side-by-side stack) on session hosts. If this is enabled then up to two schedule blocks must be defined. Default is false.


schedule block supports the following:

Type:

object({
    enabled                   = optional(bool)
    timezone                  = optional(string)
    use_session_host_timezone = optional(bool)
    schedule = optional(list(object({
      day_of_week = string
      hour_of_day = number
    })))
  })

Default: null

virtual_desktop_host_pool_start_vm_on_connect

Description: (Optional) Enables or disables the Start VM on Connection Feature. Defaults to false.

Type: bool

Default: null

virtual_desktop_host_pool_tags

Description: (Optional) A mapping of tags to assign to the resource.

Type: map(string)

Default: null

virtual_desktop_host_pool_timeouts

Description: - create - (Defaults to 60 minutes) Used when creating the Virtual Desktop Host Pool.

Type:

object({
    create = optional(string)
    delete = optional(string)
    read   = optional(string)
    update = optional(string)
  })

Default: null

virtual_desktop_host_pool_validate_environment

Description: (Optional) Allows you to test service changes before they are deployed to production. Defaults to false.

Type: bool

Default: null

virtual_desktop_scaling_plan_description

Description: (Optional) A description of the Scaling Plan.

Type: string

Default: null

virtual_desktop_scaling_plan_exclusion_tag

Description: (Optional) The name of the tag associated with the VMs you want to exclude from autoscaling.

Type: string

Default: null

virtual_desktop_scaling_plan_friendly_name

Description: (Optional) Friendly name of the Scaling Plan.

Type: string

Default: null

virtual_desktop_scaling_plan_host_pool

Description: - hostpool_id - (Required) The ID of the HostPool to assign the Scaling Plan to.

Type:

list(object({
    hostpool_id          = string
    scaling_plan_enabled = bool
  }))

Default: null

virtual_desktop_scaling_plan_tags

Description: (Optional) A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .

Type: map(string)

Default: null

virtual_desktop_scaling_plan_timeouts

Description: - create - (Defaults to 1 hour) Used when creating the Virtual Desktop Scaling Plan.

Type:

object({
    create = optional(string)
    delete = optional(string)
    read   = optional(string)
    update = optional(string)
  })

Default: null

virtual_desktop_workspace_description

Description: (Optional) A description for the Virtual Desktop Workspace.

Type: string

Default: null

virtual_desktop_workspace_friendly_name

Description: (Optional) A friendly name for the Virtual Desktop Workspace.

Type: string

Default: null

virtual_desktop_workspace_public_network_access_enabled

Description: (Optional) Whether public network access is allowed for this Virtual Desktop Workspace. Defaults to true.

Type: bool

Default: null

virtual_desktop_workspace_tags

Description: (Optional) A mapping of tags to assign to the resource.

Type: map(string)

Default: null

virtual_desktop_workspace_timeouts

Description: - create - (Defaults to 60 minutes) Used when creating the Virtual Desktop Workspace.

Type:

object({
    create = optional(string)
    delete = optional(string)
    read   = optional(string)
    update = optional(string)
  })

Default: null

Outputs

The following outputs are exported:

application_group_id

Description: The ID of the application group.

hostpool_id

Description: The ID of the host pool.

log_analytics_workspace_id

Description: The ID of the Log Analytics workspace.

private_endpoints

Description: A map of private endpoints. The map key is the supplied input to var.private_endpoints. The map value is the entire azurerm_private_endpoint resource.

registrationinfo_token

Description: The token for the host pool registration.

resource

Description: This output is the full output for the resource to allow flexibility to reference all possible values for the resource. Example usage: module..resource.id

resource_id

Description: This output is the full output for the resource to allow flexibility to reference all possible values for the resource. Example usage: module..resource.id

scaling_plan_id

Description: The ID of the scaling plan.

workspace_id

Description: The ID of the workspace.

Modules

The following Modules are called:

avm_res_desktopvirtualization_applicationgroup

Source: Azure/avm-res-desktopvirtualization-applicationgroup/azurerm

Version: 0.1.3

avm_res_desktopvirtualization_hostpool

Source: Azure/avm-res-desktopvirtualization-hostpool/azurerm

Version: 0.2.0

avm_res_desktopvirtualization_scaling_plan

Source: Azure/avm-res-desktopvirtualization-scalingplan/azurerm

Version: 0.1.2

avm_res_desktopvirtualization_workspace

Source: Azure/avm-res-desktopvirtualization-workspace/azurerm

Version: 0.1.4

avm_res_operationalinsights_workspace

Source: Azure/avm-res-operationalinsights-workspace/azurerm

Version: 0.1.3

Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.