job j {
task t {
driver = "docker"
config {
image = "nats"
}
}
}

@tgross and another Nomad engineer got me started on jobspec golf. I think this is the shortest Nomad jobspec that hclfmt won't reformat.

If Nomad left stdin open, then exec+cat would be shorter!

Even after all these years I had no idea HCL allowed unquoted block labels.

#HashiCorpNomad

I should have mentioned this only works on the 1.5 beta.

Since we added wildcard support to the datacenters parameter, we can now also default datacenters to "*"! RIP "dc1" example datacenter.

https://www.hashicorp.com/blog/nomad-1-5-adds-single-sign-on-and-dynamic-node-metadata#more-nomad-updates

Nomad 1.5 adds single sign-on and dynamic node metadata

HashiCorp Nomad 1.5, now GA, improves management of security and access with single sign-on and OIDC support, and adds dynamic node metadata, policy management in the UI, and more.

HashiCorp

Wildcard support for datacenters was originally a community contribution as well!

https://github.com/hashicorp/nomad/pull/11170

Allow wildcard datacenters to be specified in job file by jmwilkinson · Pull Request #11170 · hashicorp/nomad

Overview This PR addresses the issue #9024 It uses the filepath.Match golang std lib to accomplish the matching, which is somewhat simpler and more intuitive than using a regex. Because of that sim...

GitHub