terraform-azurerm-caf icon indicating copy to clipboard operation
terraform-azurerm-caf copied to clipboard

Feature request-Add support for scaling plan (azurerm_virtual_desktop_scaling_plan) for azure virtual desktops

Open reshmarajan1730 opened this issue 1 year ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Create a module to enable the scaling plan feature for azure virtual desktop hostpools

New or Affected Resource(s

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_desktop_scaling_plan

Potential Configuration file

wvd_scaling_plans = {
  sp01 = {
    name = "sp01"
    # friendly_name      = "Scaling Plan 01"
    # description        = "Scale plan for hostpool"
    time_zone          = "UTC"
    resource_group_key = "wvd_region1"
    schedule = {
      weekdays = {
        name                                 = "Weekdays"
        days_of_week                         = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
        ramp_up_start_time                   = "05:00"
        ramp_up_load_balancing_algorithm     = "BreadthFirst"
        ramp_up_minimum_hosts_percent        = 20
        ramp_up_capacity_threshold_percent   = 10
        peak_start_time                      = "09:00"
        peak_load_balancing_algorithm        = "BreadthFirst"
        ramp_down_start_time                 = "19:00"
        ramp_down_load_balancing_algorithm   = "DepthFirst"
        ramp_down_minimum_hosts_percent      = 10
        ramp_down_force_logoff_users         = false
        ramp_down_wait_time_minutes          = 45
        ramp_down_notification_message       = "Please log off in the next 45 minutes..."
        ramp_down_capacity_threshold_percent = 5
        ramp_down_stop_hosts_when            = "ZeroSessions"
        off_peak_start_time                  = "22:00"
        off_peak_load_balancing_algorithm    = "DepthFirst"
      }
      weekends = {
        name                                 = "Weekends"
        days_of_week                         = ["Saturday", "Sunday"]
        ramp_up_start_time                   = "09:00"
        ramp_up_load_balancing_algorithm     = "BreadthFirst"
        ramp_up_minimum_hosts_percent        = 5
        ramp_up_capacity_threshold_percent   = 2
        peak_start_time                      = "10:00"
        peak_load_balancing_algorithm        = "BreadthFirst"
        ramp_down_start_time                 = "13:00"
        ramp_down_load_balancing_algorithm   = "DepthFirst"
        ramp_down_minimum_hosts_percent      = 10
        ramp_down_force_logoff_users         = false
        ramp_down_wait_time_minutes          = 45
        ramp_down_notification_message       = "Please log off in the next 45 minutes..."
        ramp_down_capacity_threshold_percent = 5
        ramp_down_stop_hosts_when            = "ZeroSessions"
        off_peak_start_time                  = "14:00"
        off_peak_load_balancing_algorithm    = "DepthFirst"
      }
    }
    host_pool = {
      hostpool_1 = {
        key                  = "wvd_hp1"
        scaling_plan_enabled = true
      }
    }
  }
  sp02 = {
    name = "sp02"
    # friendly_name      = "Scaling Plan 01"
    # description        = "Scale plan for hostpool"
    time_zone          = "UTC"
    resource_group_key = "wvd_region1"
    schedule = {
      weekdays = {
        name                                 = "Weekdays"
        days_of_week                         = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
        ramp_up_start_time                   = "05:00"
        ramp_up_load_balancing_algorithm     = "BreadthFirst"
        ramp_up_minimum_hosts_percent        = 20
        ramp_up_capacity_threshold_percent   = 10
        peak_start_time                      = "09:00"
        peak_load_balancing_algorithm        = "BreadthFirst"
        ramp_down_start_time                 = "19:00"
        ramp_down_load_balancing_algorithm   = "DepthFirst"
        ramp_down_minimum_hosts_percent      = 10
        ramp_down_force_logoff_users         = false
        ramp_down_wait_time_minutes          = 45
        ramp_down_notification_message       = "Please log off in the next 45 minutes..."
        ramp_down_capacity_threshold_percent = 5
        ramp_down_stop_hosts_when            = "ZeroSessions"
        off_peak_start_time                  = "22:00"
        off_peak_load_balancing_algorithm    = "DepthFirst"
      }
      weekends = {
        name                                 = "Weekends"
        days_of_week                         = ["Saturday", "Sunday"]
        ramp_up_start_time                   = "09:00"
        ramp_up_load_balancing_algorithm     = "BreadthFirst"
        ramp_up_minimum_hosts_percent        = 5
        ramp_up_capacity_threshold_percent   = 2
        peak_start_time                      = "10:00"
        peak_load_balancing_algorithm        = "BreadthFirst"
        ramp_down_start_time                 = "13:00"
        ramp_down_load_balancing_algorithm   = "DepthFirst"
        ramp_down_minimum_hosts_percent      = 10
        ramp_down_force_logoff_users         = false
        ramp_down_wait_time_minutes          = 45
        ramp_down_notification_message       = "Please log off in the next 45 minutes..."
        ramp_down_capacity_threshold_percent = 5
        ramp_down_stop_hosts_when            = "ZeroSessions"
        off_peak_start_time                  = "14:00"
        off_peak_load_balancing_algorithm    = "DepthFirst"
      }
    }
    host_pool = {
      hostpool = {
        key                  = "wvd_hp3"
        scaling_plan_enabled = true
      }
    }
  }
}

References

No response

reshmarajan1730 avatar Nov 03 '23 08:11 reshmarajan1730