Writing dynamic number of files for a Nomad job

Hi there

I am designing some use-cases we could use Nomad for, and I was looking into how to run secure logshipping for Graylog.

According to the Graylog documentation a directory is supposed to hold all the client certificates entitled to send data.

Since this would be something quite dynamic and also utilizing vault, I would actually need “something” that updates a dirctory with files depending on healthy service registrations in consul and pulls the public certs from vault on those instances.

I was looking around, but am not directly sure this is something currently possible in Nomad, and I might have to bail out to (yet another) a sidecar-approach which monitors consul and takes care of the cert files in the directory, but as a last resort I would like to ask here if this is something that has an elegant built-in solution or if anyone else has encountered the same situation, and if possible, has some solutions that can be shared.

thanks
JM