Member-only story
Azure Bicep monthly updates — November 2023
Ah chips, here we go again for this months updates. The Bicep team has just released a new version of the Bicep CLI!
Let’s have a look what new features and fixes that have been released.
Expanding on compile-time imports —functions
In version 0.22.6, you probably saw that variables can be exported during compile-time. Jonny Eskew did an amazing job, allowing for functions to be exported as well using the export()
keyword.
// common-functions.bicep
@export()
func buildUrl(https bool, hostname string, path string) string => '${https ? 'https' : 'http'}://${hostname}${empty(path) ? '' : '/${path}'}'
Next to another template, you can call the functions by importing it.
// variables.bicep
import { buildUrl } from 'common-function.bicep'
var url = buildUrl(true, 'google.com') // <-- 'https://google.com'
output url string = url
In your
bicepconfig.json
, the experimental featureuserDefinedFunctions
should betrue
Sarif format for bicep build-params
Thanks to Anthony Martin, it’s now possible to build .bicepparam
and output it in Sarif format. The bicep lint
command supports also .bicepparam
files. With this update, it becomes greater to validate your Bicep code early on for linting warnings or…