Azure Maintenance Window Creation Failing via Terraform

We are facing the following issue when trying to create a maintenance window via terraform. This is needed to implement the AKS Automated Upgrades using Planned Maintenance Windows.

auto upgrade channel : Upgrade an Azure Kubernetes Service (AKS) cluster - Azure Kubernetes Service | Microsoft Docs

combined with planned maintenance window : Use Planned Maintenance for your Azure Kubernetes Service (AKS) cluster (preview) - Azure Kubernetes Service | Microsoft Docs

Following is our window definition in terraform :

resource “azurerm_maintenance_configuration” “maintenance_window” {
count = var.aks_auto_upgrade_channel_enabled ? 1 : 0 #conditional creation

name = “default”
resource_group_name =
location = local.location

window {
start_date_time = “2022-03-19 01:00”
duration = “05:00”
time_zone = “Eastern Standard Time”
recur_every = “Week Saturday”

tags = local.tags

Following is the error we are getting in Terraform Apply :

Error: creating/updating Maintenance Configuration: (Name “default” / Resource Group “rg”): maintenance.ConfigurationsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 – Original Error: autorest/azure: Service returned an error. Status=400 Code=“” Message=“Maintenance Scope provided is invalid”

│ with module.aks[“musw2”].azurerm_maintenance_configuration.maintenance_window[0],
│ on .terraform/modules/aks/ line 115, in resource “azurerm_maintenance_configuration” “maintenance_window”:
│ 115: resource “azurerm_maintenance_configuration” “maintenance_window” {

Terraform Docs : Terraform Registry

Any idea what the issue could be? The docs say that scope is an optional parameter.