Adding Azure Diagnostic Settings for VMSS

Hi all,

I am currently running a Linux VMSS with Ubuntu 20.04 VMs created using terraform. I wish to add the LAD extension to enable Diagnostic Logs to the VMs. Here is my current terraform resources for this purpose

resource "time_offset" "linux_oms_sas_start" {
  offset_days = -1
}

resource "time_offset" "linux_oms_sas_expiry" {
  offset_years = 1
}

data "azurerm_storage_account_sas" "linux_oms" {
  connection_string = var.storage_account_primary_connection_string
  https_only        = true

  resource_types {
    service   = true
    container = true
    object    = true
  }

  services {
    blob  = true
    table = true
    queue = false
    file = false
  }

  start  = time_offset.linux_oms_sas_start.rfc3339
  expiry = time_offset.linux_oms_sas_expiry.rfc3339

  permissions {
    read    = true
    write   = true
    delete  = true
    list    = true
    add     = true
    create  = true
    update  = true
    process = true
  }
  depends_on = [time_offset.linux_oms_sas_start,time_offset.linux_oms_sas_expiry]
}

resource "azurerm_virtual_machine_scale_set_extension" "da_extension" {
  name                       = "DAExtension"
  virtual_machine_scale_set_id         = var.vmss_id
  publisher                  = "Microsoft.Azure.Monitoring.DependencyAgent"
  type                       = "DependencyAgentLinux"
  type_handler_version       = "9.5"
  auto_upgrade_minor_version = false
}

resource "azurerm_virtual_machine_scale_set_extension" "diagnostics_extension" {
  name = "StorageExtension"
  virtual_machine_scale_set_id =  var.vmss_id
  publisher            = "Microsoft.Azure.Diagnostics"
  type                 = "LinuxDiagnostic"
  type_handler_version = "4.0"
  auto_upgrade_minor_version = false

  settings = <<SETTINGS
    {
      "StorageAccount": "${var.storage_account_name}",
      "ladCfg": {
          "diagnosticMonitorConfiguration": {
                "eventVolume": "Medium",
                "metrics": {
                     "metricAggregation": [
                        {
                            "scheduledTransferPeriod": "PT1H"
                        },
                        {
                            "scheduledTransferPeriod": "PT1M"
                        }
                    ],
                    "resourceId": "${var.vmss_id}"
                },
        "performanceCounters": ${file("${path.module}/azure_extension_diagnostics_linux_performancecounters.json")},
        "syslogEvents": ${file("${path.module}/azure_extension_diagnostics_linux_syslogevents.json")}
          },
          "sampleRateInSeconds": 15
      }
    }
  SETTINGS

  protected_settings = <<SETTINGS
    {
        "storageAccountName": "${var.storage_account_name}",
        "storageAccountSasToken": "${data.azurerm_storage_account_sas.linux_oms.sas}",
        "storageAccountEndPoint": "https://core.windows.net",
         "sinksConfig":  {
              "sink": [
                {
                    "name": "SyslogJsonBlob",
                    "type": "JsonBlob"
                },
                {
                    "name": "LinuxCpuJsonBlob",
                    "type": "JsonBlob"
                }
              ]
        }
    }
    SETTINGS
}

However when applying the above terraform code, I am getting an error from the portal as below

Enable failed:'NoneType' object has no attribute 'get_fluentd_syslog_src_config' 

Any help regarding on what the issue is would be greatly appreciated.