Nomad Variables for Job Names with periods


I have periods in my job names. If I try to create a Nomad variable for them, I get an error.

e.g. nomad/jobs/my.service


Error saving nomad/jobs/my.service

Error: Ember Data Request PUT /v1/var/nomad%2Fjobs%2Fmy.service?cas=0 returned a 400 Payload (text/xml) RPC Error:: 400,invalid path “nomad/jobs/my.service”

If I replace the name with hyphens (for example) it works.

I don’t think this is a bug, and honestly it bit me somewhere else (in the Traefik rules) so I’m resigned to having to change my naming convention (I really likes the periods tho lol)

So this question is really - what’s a maximum-compatible “nice” naming convention that you use?


This explains why Slashes are no longer allowed: secure vars implicit ACL policy expects invalid name · Issue #13995 · hashicorp/nomad · GitHub

I ended up just using the project slug from Gitlab-CI. It works nicely.

I usually use the terraform approach, underscores in resources, dashes in names.

This page covers it! Naming conventions - Terraform Best Practices

1 Like