Files
nomad/website/content/docs/reference/hcl2/functions/uuid/uuidv5.mdx
Aimee Ukasick 53b083b8c5 Docs: Nomad IA (#26063)
* Move commands from docs to its own root-level directory

* temporarily use modified dev-portal branch with nomad ia changes

* explicitly clone nomad ia exp branch

* retrigger build, fixed dev-portal broken build

* architecture, concepts and get started individual pages

* fix get started section destinations

* reference section

* update repo comment in website-build.sh to show branch

* docs nav file update capitalization

* update capitalization to force deploy

* remove nomad-vs-kubernetes dir; move content to what is nomad pg

* job section

* Nomad operations category, deploy section

* operations category, govern section

* operations - manage

* operations/scale; concepts scheduling fix

* networking

* monitor

* secure section

* remote auth-methods folder and move up pages to sso; linkcheck

* Fix install2deploy redirects

* fix architecture redirects

* Job section: Add missing section index pages

* Add section index pages so breadcrumbs build correctly

* concepts/index fix front matter indentation

* move task driver plugin config to new deploy section

* Finish adding full URL to tutorials links in nav

* change SSO to Authentication in nav and file system

* Docs NomadIA: Move tutorials into NomadIA branch (#26132)

* Move governance and policy from tutorials to docs

* Move tutorials content to job-declare section

* run jobs section

* stateful workloads

* advanced job scheduling

* deploy section

* manage section

* monitor section

* secure/acl and secure/authorization

* fix example that contains an unseal key in real format

* remove images from sso-vault

* secure/traffic

* secure/workload-identities

* vault-acl change unseal key and root token in command output sample

* remove lines from sample output

* fix front matter

* move nomad pack tutorials to tools

* search/replace /nomad/tutorials links

* update acl overview with content from deleted architecture/acl

* fix spelling mistake

* linkcheck - fix broken links

* fix link to Nomad variables tutorial

* fix link to Prometheus tutorial

* move who uses Nomad to use cases page; move spec/config shortcuts

add dividers

* Move Consul out of Integrations; move namespaces to govern

* move integrations/vault to secure/vault; delete integrations

* move ref arch to docs; rename Deploy Nomad back to Install Nomad

* address feedback

* linkcheck fixes

* Fixed raw_exec redirect

* add info from /nomad/tutorials/manage-jobs/jobs

* update page content with newer tutorial

* link updates for architecture sub-folders

* Add redirects for removed section index pages. Fix links.

* fix broken links from linkcheck

* Revert to use dev-portal main branch instead of nomadIA branch

* build workaround: add intro-nav-data.json with single entry

* fix content-check error

* add intro directory to get around Vercel build error

* workound for emtpry directory

* remove mdx from /intro/ to fix content-check and git snafu

* Add intro index.mdx so Vercel build should work

---------

Co-authored-by: Tu Nguyen <im2nguyen@gmail.com>
2025-07-08 19:24:52 -05:00

80 lines
3.1 KiB
Plaintext

---
layout: docs
page_title: uuidv5 - Functions - Configuration Language
description: |-
The uuidv5 function generates a uuid v5 string representation of the value in
the specified namespace.
---
# `uuidv5` Function
`uuidv5` generates a _name-based_ UUID, as described in [RFC 4122 section
4.3](https://tools.ietf.org/html/rfc4122#section-4.3), also known as a "version
5" UUID.
```hcl
uuidv5(namespace, name)
```
Unlike the pseudo-random UUIDs generated by [`uuidv4`](/nomad/docs/reference/hcl2/functions/uuid/uuidv4),
name-based UUIDs derive from namespace and an name, producing the same UUID
value every time if the namespace and name are unchanged.
Name-based UUID namespaces are themselves UUIDs, but for readability this
function accepts some keywords as aliases for the namespaces that were assigned
by RFC 4122:
| Keyword | Namespace ID | Name format |
| -------- | -------------------------------------- | ---------------------------------------------------------------------------- |
| `"dns"` | `6ba7b810-9dad-11d1-80b4-00c04fd430c8` | A fully-qualified DNS domain name. |
| `"url"` | `6ba7b811-9dad-11d1-80b4-00c04fd430c8` | Any valid URL as defined in [RFC 3986](https://tools.ietf.org/html/rfc3986). |
| `"oid"` | `6ba7b812-9dad-11d1-80b4-00c04fd430c8` | An [ISO/IEC object identifier](https://oidref.com/) |
| `"x500"` | `6ba7b814-9dad-11d1-80b4-00c04fd430c8` | [X.500 Distinguished Name](https://tools.ietf.org/html/rfc1779) |
To use any other namespace not included in the above table, pass its assigned
namespace ID directly in the first argument in the usual UUID string format.
## Examples
Use the namespace keywords where possible, to make the intent more obvious to
a future reader:
```shell-session
> uuidv5("dns", "developer.hashicorp.com/nomad")
d2616d48-e1cb-5b87-8a8c-46355decc76a
> uuidv5("url", "https://developer.hashicorp.com/nomad/")
a1572394-3948-5251-b0c7-b4ded43587b4
> uuidv5("oid", "1.3.6.1.4")
af9d40a5-7a36-5c07-b23a-851cd99fbfa5
> uuidv5("x500", "CN=Example,C=GB")
84e09961-4aa4-57f8-95b7-03edb1073253
```
The namespace keywords treated as equivalent to their corresponding namespace
UUIDs, and in some special cases it may be more appropriate to use the
UUID form:
```shell-session
> uuidv5("6ba7b810-9dad-11d1-80b4-00c04fd430c8", "developer.hashicorp.com/nomad")
d2616d48-e1cb-5b87-8a8c-46355decc76a
```
If you wish to use a namespace defined outside of RFC 4122, using the namespace
UUID is required because no corresponding keyword is available:
```shell-session
> uuidv5("743ac3c0-3bf7-4a5b-9e6c-59360447c757", "LIBS:diskfont.library")
ede1a974-df7e-5f17-84b9-76208818b2c8
```
When using raw UUID namespaces, consider including a comment alongside the
expression that indicates which namespace this represents in a
human-significant manner, such as by reference to the standard that defined it.
## Related Functions
- [`uuidv4`](/nomad/docs/reference/hcl2/functions/uuid/uuidv4), which generates pseudorandom UUIDs.