-
Notifications
You must be signed in to change notification settings - Fork 118
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
Allow a seed option for random_string #49
Comments
Hi @dantheman999301, |
Yes, I did notice that when I was having a poke around (but I don't know Go or it's libraries that well). I ended up somewhat hacking around it using a random id and then converting that to hex so it was uri friendly which did the job but was not that nice. I could even create a random int (with a seed), then hash it and then strip it to X characters but it just seems a bit of a hack. But if it can't be done, it can't be done! |
I'd like to be able to do this as well! Basic use case:
Now, I have environment resources based on I could probably work around it with a random int, seeded with something derived from the environment name, then hash that int, but it would be much nicer to work with if I didn't have to. Maybe |
@tomasaschan Is it not possible to import the |
@remilapeyre Maybe; I haven't been able to figure out how to export/import them. (The other resources I import based on their actual state in Azure, but the |
Terraform Version
v0.11.8
Affected Resource(s)
random_string
Terraform Configuration Files
Current
Proposed
Important Factoids
Mainly thinking about Azure here (not too familiar with AWS), but in Azure they have a function in their ARM scripts called uniqueString which generates a 13 character "unique" string based off other strings as seeds.
This is quite useful when you want to tear down an environment and rebuild it as the names will all stay the same.
There might be a way of doing this in Terraform that I missed but thought this could do it
The text was updated successfully, but these errors were encountered: