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

Add unique_string function #653

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smokedlinq
Copy link

This adds the ARM function uniqueString so that the community can migrate from existing ARM/BICEP based deployments that utilize the function to create resources.

The golang version was converted from a C#/PowerShell utility I wrote a few years ago.

The values can be verified with a simple bicep configuration such as:

output value string = uniqueString('/subscriptions/00000000-0000-0000-0000-000000000000', 'resource-id')

P.S. Without a spreadable tfsdk type for a list of strings, an array seemed to be the most appropriate approach as the parameter.

@smokedlinq smokedlinq marked this pull request as ready for review October 25, 2024 00:06
return murmurHash64A(bytes, 0)
}

func murmurHash64A(data []byte, seed uint32) uint64 {
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Successfully merging this pull request may close these issues.

2 participants