Releases: Azure/bicep
Release list
v0.45.6
Highlights
-
[Experimental] OCI registry support for Bicep extension publishing (#18956, #20032)
Publishing to non-ACR registries is now supported with the
ociEnabledexperimental feature enabled. Full documentation available here.Example usage - publishing a module to GitHub Container Registry:
bicep publish ./main.bicep --target br:ghcr.io/myorg/modules/storage:v1
Example usage - consuming a module from GitHub Container Registry:
module storage 'br:ghcr.io/myorg/modules/storage:v1' = { params: { // ... } }
-
@retryOndecorator is now GA! (#19988)Use the
@retryOndecorator to retry a resource deployment if the deployment hits a specific error code. You can also specify how many times this retry should happen.Example usage:
@retryOn(['ServerError'], 1) resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = { name: 'sql-server-name' location: 'polandcentral' }
-
[Bicep console] Add line navigation features, and undo+redo handling (#19992, #19996)
Recording.2026-07-02.111705.mp4
-
Inherited parameters are now optional in extended parameters files (#19698)
Example usage:
shared.bicepparamusing none // These 3 parameters are permitted, even though they're unused in main.bicep param location = 'switzerlandnorth' param customerId = '12345' param namePrefix = 'contoso'
main.bicepparamusing './main.bicep' extends './shared.bicepparam' param rgName = '${base.namePrefix}-infra'
main.bicepparam rgName string
-
Publish the language server as a NuGet dotnet tool (#19976)
It's now possible to run the Bicep Language Server with the following command:
dnx -y Azure.Bicep.LangServer
-
Add
secure-params-in-parameters-filelinter rule (#20021)The following usage pattern will be flagged:
// main.bicep @secure() param secureParam string param insecureParam string
// main.bicepparam using 'main.bicep' param secureParam = 'MYSECRET' param insecureParam = secureParam // <-- now flagged (Warning)
-
Add
no-hardcoded-outputslinter rule (defaults to "off") (#19994)The following usage pattern will be flagged:
output apiVersion string = '2024-01-01'
And given an automatic fix:
@export() var apiVersion = '2024-01-01'
-
Bicep RPC Client: Implement pooled client factory (#19886)
Instead of creating a new Bicep client for each call to
Initialize, this factory manages a pool of clients with multiplexed connections, making it more efficient for use across multiple threads.Example usage:
using var factory = new PooledBicepClientFactory(); using var bicep = await factory.Initialize(new() { BicepVersion = "0.45.6" });
Features and Bug Fixes
- Show version-specific docs links on resource hovers (#20016)
- Display nested operations in local deploy CLI (#19974)
- Display nested errors in local deploy (#19983)
- Make REPL load-function output locale-invariant for numeric values (#19752)
- Handle invalid json parameters files in the deployment pane (#19838)
- Improve inline type property decorator completion logic and add tests (#19174)
- Fix build-params crash for inherited object params in extended bicepparam files (#19895)
- Fix discriminated union IntelliSense for root-level params in .bicepparam files (#19987)
- Validate instance function call placement (#19980)
- Fix description not showing for template spec module (#20026)
- Fix force restore command to show picklist if active file is not a bicep file or no file is open (#20029)
- Emit warning comment when parameter names are renamed during decompilation (#19977)
- any? property and parameter incorrectly marked as required (#19990)
- Add '=' completion after module path string (Ctrl+Space) (#20022)
- Add warning when decompiling a bicep generated ARM template (#20028)
- Fix nested resource reference completions (#20017)
- Fix invalid rename location errors (#20015)
- Fix resource methods on aliased collection elements (#20019)
- Fix Bicep playground WASM file handling (#20023)
- Fix escape sequence semantic highlighting (#19975)
- Block non-pure functions in exported declarations (#20025)
- Replace BCP Error with Warning for Nullable Types (#20024)
- Allow readable resource properties in user-defined functions (#19979)
- Various improvements to the Visualizer rendering logic (#19757, #19792, #19884, #19937, #19939)
- Add Azure visualizer resource icons (#20014)
Community Contributions
- Fix local deploy compilation for large module templates (#19754) - thanks @GABRIELNGBTUC !
- fix:
bicep consolemulti-line user-defined type input handling (#19699) - thanks @johnlokerse ! - Added option to exit Bicep console with CTRL+C (#19995) - thanks @johnlokerse !
- Allow roleDefinitions in resource ID lint rule (#19888) - thanks @nkgotcode !
- Support for filesystem-based mocks of registry aliases (#19452) - thanks @SimonWahlin !
- fix: include deploy pane dropdown defaults (#19793) - thanks @nanookclaw !
v0.44.1
Highlights
-
Extendable Params are now GA! (#19697)
Extendable Bicep Parameter Files (enabled with the
extendkeyword) allows you to reuse parameters from one.bicepparamfile in another.bicepparamfile.root.bicepparamThis is your main bicepparam file, which can be reused by multiple extended .bicepparam files and in multiple deployments.using none // Notice that the first line of this .bicepparam file declares `using none` which tells the compiler not to validate this against any particular .bicep file. param namePrefix = 'Prod'
leaf.bicepparamThis is your extended bicepparam file, which will refer to one main.bicep file and one main .bicepparam file. Any parameter value in this file will override all previous values.using 'main.bicep' extends 'root.bicepparam' param namePrefix = 'Dev' // this will override the 'Prod' value we assign in our root.bicepparam file
-
ThisNamespaceandNullIfNotFoundare now GA! (#19639)When applied to an existing resource, using the
@nullIfNotFound()decorator for existing resources will returnnullif it doesn't exist at deployment time instead of failing.@nullIfNotFound() resource exampleResource 'Microsoft.Storage/storageAccounts@2021-04-01' existing = { name: 'test' }
For 'ThisNamespace':
this.exists()returns a bool indicating the existence of the current resource.this.existingResource()returns null if the resource does not exist and returns the full resource if the resource exists.resource usingThis 'Microsoft...' = { name: 'example' location: 'eastus' properties: { property1: this.exists() ? 'resource exists' : 'resource does not exist' property2: this.existingResource().?properties.?property2 property3: this.existingResource().?tags } }
Features and Bug Fixes
- Remove old Cytoscape.js visualizer (#19747)
- Migrate to System.CommandLine library for CLI commands for enhanced discoverability (#19312)
- Trim mcp tools returned resource schema (#19645)
- fix vs code generate params json output path (#19755)
- Fix BCP120 on extension Required+DTC identifier properties (#19637)
Diagnostics and Tests
v0.43.8
Features and Bug Fixes
- Reverted the retryOn decorator to an experimental feature flag (#19604)
- The retryOn experimental flag was removed in the previous release, but the feature is not yet enabled in template language version 2.0. This could cause validation errors during deployment for users relying on retryOn. This release restores the feature flag as a temporary workaround while backend support for template language version 2.0 is being rolled out.
- Added build_bicep and build_bicepparam tools to the MCP server (#19602)
v0.43.1
Note
We encountered an issue while publishing this release of the Bicep VS Code extension, and version v0.43.1 is not available on the Visual Studio Marketplace. We are working on publishing a new version, which should be available in the next few days.
Highlights
-
@retryOndecorator is now GA! (#19454)Use the
@retryOndecorator to retry a resource deployment if the deployment hits a specific error code. You can also specify how many times this retry should happen.Example usage:
@retryOn(['ServerError'], 1) resource sqlServer 'Microsoft.Sql/servers@2021-11-01' = { name: 'sql-server-name' location: 'polandcentral' }
-
New
like()anddistinct()functions (#18990, #19167)Example usage:
param myInput string = 'FooBar' // outputs true if myInput contains 'Bar' output wildcardMatch bool = like(myInput, '*Bar*') // outputs [1, 2, 3] output values int[] = distinct([1, 2, 2, 3, 1])
-
Add
use-recognized-resource-typelinter rule to warn for unrecognized resource types in reference/list* functions (#19303)The following code will emit a warning because 'Microsoft.Foo/bar' is not a recognized resource type:
output foo object = reference('Microsoft.Foo/bar', '2020-01-01')
-
Add
no-module-namelinter rule to enforce omitting explicit module names (optional - off by default) (#19556)The following code will emit a warning if enabled, because the module
nameproperty is no longer needed:module foo 'foo.bicep' = { name: 'foo' params: { ... } }
Features and Bug Fixes
- [BREAKING CHANGE] Block usage of custom domains for ACR (#19564)
- Bicep snapshot CLI commands:
- Deploy command: Allow location for non-RG scope deployments (#19330)
- Add description to module name property for improved IntelliSense (#19310)
- Fix duplicate errors for undefined types on resources (#19273)
- Bicepparam Improvements:
- MCP Server Improvements:
- Allow expressions in
getSecretfunction (#19204) - Theme vscode-elements widgets in visualizer ExportToolbar (#19557)
Community Contributions
- Update waitUntil feature description in docs (#19560) - thanks @brianveldman !
- Fix resource manager: Add condition for opened PRs from dependabot (#19311) - thanks @DragosDanielBoia !
v0.42.1
Highlights
- Bicep console GA! (#19261)
- Bicep Role Definitions Function (#18457)
properties: { roleDefinitionId: roleDefinitions('Data Factory Contributor').id principalId: scriptIdentity.principalId }
Features and Bug Fixes
Experimental Visualizer
An experimental version of the Bicep visualizer was added, which can run side-by-side with the existing one. The new visualizer includes several improvements:
- Improved UI styling
- Accessibility enhancements: accent color support and a light high-contrast theme
- New feature: export the graph as a PNG image (see screenshot below)
To use the new visualizer, right-click the editor tab and select Open Bicep Visual Designer (Experimental) or Open Bicep Visual Designer to the Side (Experimental):
The existing visualizer will be deprecated and removed after two release cycles.
Other
- Enhance error messages for ArgumentException (#19208)
- External input bug fixes (#19256)
- Don't crash when nonexistent symbol is used with external inputs (#19260)
- Don't crash on error symbol external input parameters (#19263)
- Update active pseudo-grammar of the bicep language (#19169)
- Added the grace period to delay recommending the latest API version (#19205)
- RpcClient: Various improvements for safety + ux (#19203)
- Add more info about JSONRPC (#19277)
- Fix generate-params JSON defaults (#19265)
- Fix playground quickstart module handling and Monaco worker init (#19264)
v0.41.2
Highlights
-
Snapshot command is GA (#19084)
Example usage:
# capture a snapshot bicep snapshot main.bicepparam # validate a snapshot bicep snapshot main.bicepparam --mode validate # capture a snapshot with Azure context bicep snapshot main.bicepparam --subscription-id 3faf6056-8474-4818-a729-1aff55d6b3fa --resource-group myRg --location westus --mode overwrite
Walkthrough YouTube - Bicep Snapshot Demo
Official docs coming soon. In the meantime, see Using the snapshot command.
-
[Experimental]
@nullIfNotFound()decorator forexistingresources (#18697)Basic example:
@nullIfNotFound() resource storageAccount 'Microsoft.Storage/storageAccounts@2021-04-01' existing = { name: 'testStorage' } output safeLocation string? = storageAccount.?location output safeSkuName string? = storageAccount.?sku.name output safeAccessTier string? = storageAccount.?properties.accessTier output locationWithDefault string = storageAccount.?location ?? 'westus' output skuNameWithDefault string = storageAccount.?sku.name ?? 'Standard_LRS' output accessTierWithDefault string = storageAccount.?properties.accessTier ?? 'Hot'
Bug Fixes and Features
- Add MCP server metadata JSON file to NuGet package (#18909)
- Add section on comments to Best Practices doc (#18913)
- Fix nested extendable params spread: ensure inherited spread expressions are bound correctly (#19028)
- add support for array splat completion in type syntax and enhance completion context (#18948)
- Add completions for
#disable-diagnosticsand#restore-diagnostics(#18919) - Add extension namespace functions (#18910)
- [PublishExtension command] Ensure namespace functions are considered when building types archive (#18999)
- Use file handle URI in output (#18920)
- [Experimental] Visualizer V2 (#18986, #18987, #18992, #18995, #19025, #19029, #19080)
Community Contributions
- Minor typos in README.md (#19079) - thanks @gerbermarco !
- Enhance snapshot command documentation (#18959) - thanks @verschaevesiebe !
- Add snapshot command help documentation to RootCommand (#18988) - thanks @verschaevesiebe !
v0.40.2
Highlights
-
Multi-line interpolated strings GA! (#18666)
Basic example:
var s = $''' this is ${interpolated}'''
With multiple
$characters:var s = $$''' this is $${interpolated} this is not ${interpolated}'''
-
[Experimental] New
this.exists()andthis.existingResource()functions for resource existence checks (#17727)Example usage:
resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = { name: 'mystorageaccount' location: 'eastus' sku: { name: 'Standard_LRS' } kind: 'StorageV2' properties: { minimumTlsVersion: 'TLS1_2' publicNetworkAccess: this.exists() ? 'Enabled' : 'Disabled' } }
-
New MCP Server tools (#18707, #18826)
decompile_arm_parameters_file: Converts ARM template parameter JSON files into Bicep parameters format (.bicepparam).decompile_arm_template_file: Converts ARM template JSON files into Bicep syntax (.bicep).format_bicep_file: Applies consistent formatting (indentation, spacing, line breaks) to Bicep files.get_bicep_file_diagnostics: Analyzes a Bicep file and returns all compilation diagnostics.get_file_references: Analyzes a Bicep file and returns a list of all referenced files including modules, parameter files, and other dependencies.get_deployment_snapshot: Creates a deployment snapshot from a .bicepparam file by compiling and pre-expanding the ARM template, allowing you to preview predicted resources and perform semantic diffs between Bicep implementations.
-
Publish Bicep MCP server as a nuget package (#18709)
Example
mcp.jsonconfiguration:{ "servers": { "Bicep": { "type": "stdio", "command": "dnx", "args": [ "Azure.Bicep.McpServer", "--yes" ] } } } -
bicep console: Support piping and stdin/out redirection (#18762)Example with piping:
echo "parseCidr('10.144.0.0/20')" | bicep console
Example with input redirection:
echo "parseCidr('10.144.0.0/20')" > test.txt bicep console < test.txt
Example with output redirection:
echo "parseCidr('10.144.0.0/20')" | bicep console > output.json
-
Extendable Parameter Files Improvements:
-
Multiline diagnostic pragmas (#18622)
Disable a specific diagnostic for a whole file:
#disable-diagnostics BCP422 ... resource foo 'type@version' = if (condition) {} output bar string = foo.properties.bar // <-- would normally raise BCP422 as a warning, but will not due to pragma at top of file
Disable specific diagnostics for a span:
resource foo 'type@version' = if (condition) {} #disable-diagnostics BCP422 output bar string = foo.properties.bar // <-- would normally raise BCP422 as a warning, but will not due to pragma at top of file #restore-diagnostics BCP422 output baz string = foo.properties.baz // <-- will raise BCP422 warning because it's outside of the pragma fence
-
Migrate to .NET 10 (#18458)
Bug Fixes and Features
- Use integer and boolean literal types when deriving return type for
loadJsonContent(#18466) - Update
deployment()return type signature to add conditionalmetadataproperty (#18468) - Recognize
<collection module>[<index>]!as a direct module reference for secure outputs check (#18522) - Extension config default values constraint fixes (#18606)
- Update lv 2.0 triggers to take syntactically nested resources into account (#18607)
- Making the scope property a fully qualified resource Id (#18165)
- Expand support for types in local extension (#18662)
- Improved extension configuration experience (#18828)
- Fix handling registry module resource derived types in params file (#18661)
- Fix completion to correctly suggest imported types in bicepparam files (#18523)
- Fix quoted property names and enhance symbol resolution (#18509)
- Fix nested function calls losing bindings when using extendable parameters (#18876)
- Always use named pipes on Windows for gRPC (#18712)
- Remove DSC experimental feature (#18821)
- Simplify YAML/JSON parser code path with Result pattern (#18713)
- Refactor external inputs processing logic to use
InlineDependencyVisitorand dedicatedFunctionFlag(#18740) - Update CSAT survey to be always on instead of annual (#18657)
Documentation
- Add troubleshooting steps for MCP tools not showing (#18563)
- Revise Bicep MCP Server Docs (#18699)
- Revise local deploy debugging guide for Bicep extensions (#18701)
- Add unit testing guide for Bicep extensions (#18702)
- Add beginner tip to Bicep getting started section (#18706)
- Improve documentation for extendable parameter files (#18656)
- Add bicep local-deploy arguments table docs (#18788)
Community Contributions
- E2E Tests for playground with playwright (#18521) - thanks @ShpendKe !
- Add: bicep local-deploy arguments table docs (#18788) - thanks @johnlokerse !
- Add beginner tip to Bicep getting started section (#18706) - @JennyCloud !
- Fix grammar in codebase documentation (#18768) - thanks @JennyCloud !
v0.39.26
Highlights
-
[Experimental] Enhancements to
bicep consolecommand: -
[Requires the
multilineStringInterpolationExperimental feature] New syntax for multi-line string interpolation (#18324)
Basic example:var s = $''' this is ${interpolated}'''
With multiple
$characters:var s = $$''' this is $${interpolated} this is not ${interpolated}'''
Bug Fixes and Features
- Improve F12 UX for using declaration in .bicepparam (#18372)
- Add ability to promote info diagnostics to warning in msbuild (#18412)
- Document
bicep consolefor-loop expression limitations (#18269) - Update ARM JSON type loader to support optional type constraints (#18307)
- Block the
existingkeyword for extension resources that have no readable scopes (#18260) - Document the
list_avm_metadataBicep MCP tool (#18327) - improve syntax handling and update diagnostics for decorators in parameter files (#18274)
- Add support for extended imports (#18223)
bicep deploy: Disable live table rendering if ANSI disabled (#18409)- Fix for deployCommands experimental feature issue (#18367)
- Clarify JSONRPC command options in RootCommand.cs (#18418)
- Add diagnostic trace information on OS & architecture (#18321)
- Build command: Don't write an empty file on unhandled exception (#18214)
- Support access token refresh in deploy pane (#18326)
- Provide simple DI methods for common libraries (#18362)
- DSC requires the
apiVersionfield and it's no longer being emitted (#18365)