Add resources for uuid v4 and v7 #706
Open
+1,535
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue
Fixes #402
Fixes #511
Description
The UUIDs generated by the existing
random_uuid
resource are not valid UUIDs per RFC 4122, so they cause problems when a user attempts to use them in a system which expects UUIDs to be a specific version. Per the discussion on #402, I have done this by cloning the existing uuid resource, renaming it as uuid4 and uuid7 respectively, and using the Google Go UUID library instead with the appropriate methods to generate valid UUIDs of the appropriate versions. This way, users of the existinguuid
resource will continue to have the same behavior without making any changes. Users who need one of these UUID versions can use the specific resource for that so that it is clear to any readers of the code what version is being used and that that version is being used intentionally.Rollback Plan
Changes to Security Controls
Given that this is random data, there are no security controls involved.