Azure / bicep

Bicep is a declarative language for describing and deploying Azure resources
MIT License
3.2k stars 742 forks source link

Add hash functions #5925

Closed mariussm closed 1 year ago

mariussm commented 2 years ago

Is your feature request related to a problem? Please describe.

When working with files in a blob, or other places that I want things to happen when content has changed, hashing functions is useful.

Describe the solution you'd like

I would like the following string functions, that calculates hashes of strings and files:

sha1() sha256() md5() sha1file() sha256file() md5file()

alex-frankel commented 2 years ago

Can you share some use cases of where you would expect to use these functions? It'd be great to see some pseudo-bicep code that shows how these would be consumed.

stan-sz commented 2 years ago

Additionally, to get consistent and deterministic hashing results of arrays, sorting functions would be required #2251

stan-sz commented 2 years ago

@mariussm ARM templates already have a deterministic hash function uniqueString: https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-string#uniquestring

ghost commented 1 year ago

Hi mariussm, this issue has been marked as stale because it was labeled as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thanks for contributing to bicep! :smile: :mechanical_arm: