Can I reference a file for a template variable?

Hi Everyone,

I use a template to parse a startup script I have for a Google Cloud Instance, similar to this:

metadata_startup_script = templatefile("./bootstrap.sh", {var = “whatever”})

Is it possible for the value of a variable here to be a file? I want to reference a file rather than having this particular config directly in the script itself

I have tried to use ${file…} but that doesn’t seem to work:

Error: Invalid character

17:   metadata_startup_script = templatefile("./bootstrap.sh", { var = ${file(var.myfile)} })

This character is not used within the language.

I use ${file…} in other parts of my code without issue but it doesn’t seem to like it here. Is this something that is supported?

Thanks!