website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
[!IMPORTANT]
Documentation Update: Product documentation previously located in/websitehas moved to thehashicorp/web-unified-docsrepository, where all product documentation is now centralized. Please make contributions directly toweb-unified-docs, since changes to/websitein this repository will not appear on developer.hashicorp.com. ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
uuidv4 Functionuuidv4 generates a unique identifier string.
The ID is a generated and formatted as required by RFC 4122 section 4.4, producing a Version 4 UUID. The result is a UUID generated only from pseudo-random numbers.
This function produces a new value each time it is called, and so using it
directly in resource arguments will result in spurious diffs. We do not
recommend using the uuidv4 function in resource configurations.
> uuidv4()
9fc99a70-7cd5-482d-bb2b-03af016e4e94
uuidv5, which generates name-based UUIDs.