Skip to content

Conversation

@masongup-mdsol
Copy link
Contributor

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
@hashicorp-cla-app
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
Contributor 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.

@rainkwan rainkwan force-pushed the support-uuid-versions branch 2 times, most recently from 5eca8b5 to b388522 Compare September 18, 2025 14:35
@rainkwan
Copy link

Hi @masongup-mdsol thank you for your contribution! 😄

This looks pretty reasonable, I wanted to ask if you could create a changelog entry for this as an enhancement. And also if you can run make generate so that the CI passes.

Thank you!

@masongup-mdsol
Copy link
Contributor Author

Thanks @rainkwan, I have done both

@rainkwan rainkwan force-pushed the support-uuid-versions branch from b8a9c92 to dfd7172 Compare September 23, 2025 18:37
@chrisjaimon2012
Copy link

chrisjaimon2012 commented Oct 9, 2025

any timeline regarding when this can be released?

@rainkwan rainkwan force-pushed the support-uuid-versions branch from dfd7172 to 4d6acc1 Compare October 20, 2025 16:07
@rainkwan rainkwan requested a review from a team as a code owner October 20, 2025 16:07
@rainkwan rainkwan enabled auto-merge (squash) October 20, 2025 17:05
Copy link

@rainkwan rainkwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems reasonable to me

@rainkwan rainkwan merged commit a9630fb into hashicorp:main Oct 20, 2025
82 checks passed
@masongup-mdsol masongup-mdsol deleted the support-uuid-versions branch October 20, 2025 17:49
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