Packs and fileContents

Trying to play a bit with nomad-pack. I’m just noticing some problems with fileContents function. The first issue is that fileContents is not relative to the pack itself, but to the current dir of the caller.
But the other issue is that there’s no rendering done on the content of the file. If a file included has some [[ .my_pack.my_variable ]] it’ll be returned as is, without replacing it.
The very same issue affect HCL2 and the file function, where no interpolation is made. It’s small thing, but makes making, maintaing, and sharing components much harder than it should be.
For small templates, we can inline them, but for a lot of use cases, you want to store templates in distinct files.
Is the only way to do this with nomad-pack to use helper template like this ?

[[- define "my_config" -]]
[[- end -]

And then to include it like this in the main job template

      template {
        data =<<-EOF
[[ template "iscsi_controller" . ]]

The same with HCL2 in nomad, where, without interpolation, I have to publish my variable as env in the task, just to be able to access its value with

   task {
    driver = "docker"
    env {
      MY_VAR = var.my_var

and then I can use

{{ env "MY_VAR" }}

In both cases, this looks very clumsy and more a workaround than a solution. How are you guys handling this ?