uuid generates UUID-format strings using random bytes.
The function generates a well-understood string representation of a 128-bit value, but the output is not RFC-compliant.
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
uuid function in resource configurations, but it can
be used with care in conjunction with
ignore_changes lifecycle meta-argument.
In most cases we recommend using the
instead, since it allows the one-time generation of random values that are
then retained in the Terraform state for use by
future operations. In particular,
random_id can generate results with
equivalent randomness to the
uuidv5, which generates name-based UUIDs.