Open cpc-justinbrown opened 9 months ago
Hi, it works with use_session_hosts_timezone=false
:
resource "azurerm_virtual_desktop_host_pool" "this" {
name = var.name
type = "Pooled"
load_balancer_type = "DepthFirst"
validate_environment = false
maximum_sessions_allowed = 2
start_vm_on_connect = true
resource_group_name = var.resource_group
location = var.location
scheduled_agent_updates {
enabled = true
timezone = "UTC"
use_session_host_timezone = false
dynamic "schedule" {
for_each = var.agent_update_maintenance_window
content {
day_of_week = schedule.value["day_of_week"]
hour_of_day = schedule.value["hour_of_day"]
}
}
}
custom_rdp_properties = try(join(";", var.custom_rdp_properties), null)
tags = var.tags
}
I dont know if its supposed to be like this tho ...
Is there an existing issue for this?
Community Note
Terraform Version
v1.5.7
AzureRM Provider Version
v3.80.0
Affected Resource(s)/Data Source(s)
azurerm_virtual_desktop_host_pool
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
"agentUpdate":{"type":"Scheduled"}
is expected to specify required attributesUseSessionHostLocalTime
andMaintenanceWindows
per error message.Actual Behaviour
The Terraform plan correctly shows the intended scheduled update configuration.
This looks to be the PUT request with incompletely formed
agentUpdate
attribute:Applying returns an HTTP 400 from Azure with message "Error: Agent update UseSessionHostLocalTime must be set., MaintenanceWindows must have one MaintenanceWindow set."
Steps to Reproduce
Important Factoids
No response
References
API Reference: https://learn.microsoft.com/en-us/rest/api/desktopvirtualization/host-pools/create-or-update?view=rest-desktopvirtualization-2022-02-10-preview&tabs=HTTP#agentupdateproperties Related Feature Request: https://github.com/hashicorp/terraform-provider-azurerm/issues/16542 Related PR: https://github.com/hashicorp/terraform-provider-azurerm/pull/17489