How to combine two provisioners in error cleanup?

I would like to

  1. run “export logs to file”, i.e. shell action
  2. download collected logs, i.e. file action

are there best practices how to implement “1)” and “2)” together in error cleanup provisioner ?

Coincidentally running into the exact same problem.

Tried using

  error-cleanup-provisioner "shell" {
    inline = ["journalctl --boot > /tmp/boot_log.txt"]
  }

  error-cleanup-provisioner "file" {
    source      = "/tmp/boot_log.txt"
    destination = "boot_log.txt"
    direction   = "download"
  }

But this is not allowed

Error: Only one error-cleanup-provisioner is allowed