Nomad Variable Specification
Nomad Variables may be specified as HCL files and submitted by the
nomad var put
CLI command.
Unlike Job specifications, Nomad Variables specifications do not support HCL2 features like functions.
Example variable specification generated by nomad var init
:
Example usage if the above is in a file named spec.nv.hcl
:
Variable Specification Parameters
path
(string: <optional>)
- The path to the variable being defined. If empty it must be specified on the command line.namespace
(string: <optional>)
- The namespace of the variable. May be overridden by the-namespace
command line flag orNOMAD_NAMESPACE
environment variable.items
(object: <required>)
- Object of keys and values to set. Must be strings.
See Variable Restrictions for details on path
and items
name restrictions.