Skip to content

Conversation

masongup-mdsol
Copy link

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 existing uuid 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

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Given that this is random data, there are no security controls involved.

@masongup-mdsol masongup-mdsol requested a review from a team as a code owner June 26, 2025 19:43
@rainkwan rainkwan mentioned this pull request Jun 30, 2025
1 task
@rainkwan rainkwan force-pushed the support-uuid-versions branch from 3839326 to 8411ece Compare July 16, 2025 03:58
Copy link

hashicorp-cla-app bot commented Jul 16, 2025

CLA assistant check
All committers have signed the CLA.

@rainkwan
Copy link

Hi @masongup-mdsol,

I can review this after signing the CLA. 👍🏽

@masongup-mdsol
Copy link
Author

Ah okay, I thought I had signed it already, but I guess I didn't finish the workflow properly before. I think it should be good now.

@chrisjaimon2012
Copy link

@rainkwan can you take a look at this when you get some time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support UUIDv7 Improve uuid generated by making it valid
3 participants