-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
[WIP] Add interpolate uuid function #3563
Conversation
f898a31
to
76bb96d
Compare
76bb96d
to
26f5d67
Compare
This doesn't solve everything in #2269 yet, mostly assumes you'll use |
@@ -33,6 +34,7 @@ func init() { | |||
"split": interpolationFuncSplit(), | |||
"base64encode": interpolationFuncBase64Encode(), | |||
"base64decode": interpolationFuncBase64Decode(), | |||
"uuid": interpolationFuncUuid(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run gofmt
on this? That will line up these declarations.
This is looking good! A few minor comments and needs a rebase, but then this should be good to go. 👍 |
I'd be down for a second optional parameter that simply trims the string to a given max length - provided we document that it removes the uniqueness properties of RFC 4122 and increases the chance of collision.
|
Curious. What is the status on this? |
👍 |
hey @gjohnson any chance you can rebase this? |
Hey folks, I ended up revisiting this over in #5575 and taking a slightly different approach on the implementation. If we want a second function that works more like Terraform's internal Thanks for the work you put into this @gjohnson! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Mostly just an exposed version of the uuid function added by @phinze and @radeksimko for resources.
I thought about adding a size parameter to control the length of the generated id (would make it more of a uid than a legit uuid though), thoughts?
To Do