.nomad.tpl as the filename

I have been building a lot of packs and have found that my templates/ directory often has only one file. To make things concise and easy I have found that I can just name the job template file: .nomad.tpl. This works and I have not yet run into any problems.

I am wondering if anyone else can think of potential pitfalls of naming the job template file in this way.

I tend to do it the other way around so .template.nomad this way my code editor I use auto picks up the language and i get all the syntax loaded automatically. I don’t use packs though and instead am using levant for templating so this might not be applicable in this case :slightly_smiling_face:

Though most modern editors allow you to specify what language certain extensions use so the way you specified would work in an IDE too :slightly_smiling_face:

@CarbonCollins, I have not used levant. Packs requires the .nomad.tpl extension. I agree, it is nice to have modern IDEs that can be modified so easily.

1 Like

Could you mention the IDE and extensions you use to work with Nomad Packs?
Currently for me its the most painful part of the process, I am writing templated hcl with no syntax highlighting nor auto-formatting. :smiling_face_with_tear:

I use Goland with the Terraform and HCL plugin.

Thanks!, I had to reassign the File Type to use HCL. That’s a bit better, but does the code reformatting works for you? My just messes everything.