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