Skip to content

Instantly share code, notes, and snippets.

@johnlokerse
Created March 17, 2024 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnlokerse/cfab385000223553c58ec4f7b4cb227b to your computer and use it in GitHub Desktop.
Save johnlokerse/cfab385000223553c58ec4f7b4cb227b to your computer and use it in GitHub Desktop.
Create your own function in Azure Bicep with user-defined functions blog
type deploymentScriptArgumentsType = {
name: string
value: string
}[]
func funcFormatArguments(arguments deploymentScriptArgumentsType, delimiter string) string => join(map(arguments, arg => '-${arg.name} ${arg.value}'), delimiter)
output formattedArguments string = funcFormatArguments([{ name: 'name', value: 'John Doe' }, { name: 'age', value: '31' }], ' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment