Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve uuid generated by making it valid #402

Open
1 task done
dngferreira opened this issue Apr 28, 2023 · 4 comments
Open
1 task done

Improve uuid generated by making it valid #402

dngferreira opened this issue Apr 28, 2023 · 4 comments

Comments

@dngferreira
Copy link

Terraform CLI and Provider Versions

Terraform v1.4.5 - on darwin_amd64

provider 3.5.1

Use Cases or Problem Statement

Currently random_uuid doesn't generate uuid's that follow the RFC 4122 and can be validated against the same RFC.

Some applications we interact with do uuid's validation which is causing some problems with terraform automation of those uuid's across multiple services.

Proposal

migrate from go-uuid to github.com/google/uuid library

How much impact is this issue causing?

Medium

Additional Information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bflad
Copy link
Member

bflad commented May 3, 2023

Hi @dngferreira 👋 Thank you for raising this. It is a little unfortunate that the resource is named "uuid" when, as its description mentions, its a "UUID-formatted string" rather than following RFC 4122's definition of a UUID.

To be upfront, I'm imagining that if this proposal is accepted (depending on the burden for practitioners to deal with the adjustment) the implementation of the existing resource would not potentially be updated until a future major version, which is not planned at the moment. Another option may be to introduce a separate new resource or potentially offload UUID-based resources onto a different provider.

I will reach out to the product owner for this provider and leave this issue open to determine other community interest, signaled by 👍 reactions on the issue.

@dngferreira
Copy link
Author

dngferreira commented May 5, 2023

Hi,
Can we add a random_uuid4 resource that generates valid uuid version 4 UUID's that can be validated?

I'm willing to take time and make a PR if the team would validate it.

@pablodiazgutierrez
Copy link

We just ran into this issue with an app for Microsoft's ecosystem. Our app is hosted in a number of Office apps (Teams, Outlook, etc), and while it works in most settings, it silently refuses to load when in microsoft365.com, because they use an RFC-compliant validator in that specific host.

I would suspect that, collectively, this issue is costing a lot of engineering time to work out.

@rainshen49
Copy link

rainshen49 commented Apr 30, 2024

To echo Pablo's comment, we (Google) also validate UUID4s in parts of our ecosystem. IMO Terraform should be providing such a uuid4 generator because it's a widely used standard, not specific to any company. I see that equivalent functions already exist in other Hashicorp products such as Packer. Please consider prioritizing this.

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

No branches or pull requests

4 participants