hashicorp / hashicorp/nomad-pack

How to get `name` in job template?

Open
#724 6 comments 1 reaction 1 assignee Claimed by @Juanadelacuesta View on GitHub
stage/waiting-reply type/question
Dominant language
Go
Stars
447
Forks
65
PR merge metrics
No merged PRs in 30d

Description

```
--name=
If set, this will be the unique identifier of this deployed instance
of the specified pack. If not set, the pack name will be used. This
is useful for running more than one instance of a pack within the same
cluster. Note that this name must be globally unique within a cluster.
Running the run command multiple times with the same name, will just
re-submit the same pack, and apply changes if you have made any to
the underlying pack. Be mindful that, whether you have made changes
or not, the underlying Allocations will be replaced. When managing
packs, the name specified here is the name that should be passed to
nomad-pack's plan and destroy commands.
```

How do you get value in job template of this argument?
I know I can get meta (ie `[[ meta "pack.name" . ]]`) and vars (ie `[[ var "id" . ]]`) but no info on how to get unique identifier passed as `--name=`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.