Declaring network inside resources has been deprecated (I think it happened on v0.12.0), so you should always define it at the group level. If you are using a more recent version Nomad task level network might not work.
Since this is a fairly recent change, you might still find job files that use the old syntax, which can be quite confusing…please let us know if you come across any outdated examples in our documentation.
Thank you for the quick reply. The problem I’m hitting is that if I define the network at the group level, the job seems to run, but the health checks fail. If it put it resources, the health checks work. Please take a look at the Github Gist linked in the original post.
Thank you for the solution! That does indeed work. I would suggest updating this page: Job Specification | Nomad by HashiCorp as that was what I was working from, and it does not have the “ports” parameter in the “config” section.