How to update metadata for azure adsl gen2 path/directory

using the below command to to update the metadata for adsl gen2 path/directory
az storage fs directory metadata update --name <> --file-system <> --account-name <> --metadata “ProjectOwner=test” “Environment=dev” “ProjectName=new” “TicketNo=123”

not able to achieve the same using terraform as azurerm_storage_data_lake_gen2_path does not support updating properties or metadata.

I could use the below code but there are limitations as it does not trigger for every run.
/*resource “null_resource” “folders_metadata” {

    provisioner "local-exec" {
      command = <<-EOT
        az storage fs directory metadata update --name ${upper(var.datasource_foldername)} --file-system ${data.azurerm_storage_container.rz_container.name}  --account-name ${data.azurerm_storage_account.storage.name} \
        --metadata "DataSourceOwner=${var.DataSourceOwner}" "Environment=${var.Environment}" "ProjectName=${upper(var.ProjectName)}" "TicketNo=${var.TicketNo}"  --auth-mode login
      EOT

      on_failure = fail

    }
  depends_on = [azurerm_storage_data_lake_gen2_path.rz_datasource_folders]
  }

hence im stuck with my code.
any help or ideas would be appreciated
thanku

To trigger metadata updates for an Azure Data Lake Gen2 directory using Terraform, you can use a null_resource with a local-exec provisioner and add a triggers block. This block should contain variables that, when changed, will cause the null_resource to execute the Azure CLI command to update the metadata. This approach ensures the command runs whenever relevant variables are modified.