Releases: Azure/bicep
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)
Community Contributions
v0.38.33
v0.38.5
v0.38.3
Highlights
-
onlyIfNotExists GA! (#17996)
@onlyIfNotExists() resource onlyDeployIfNotExists 'Microsoft...' = { name: 'example' location: 'eastus' properties: { ... } }
-
[Experimental] Interactive
bicep consolecommand for REPL functionality (#18152)console.mov
See Using the Console Command for additional information.
-
[Experimental] Interactive
bicep deploy,bicep what-ifandbicep teardowncommands (#18041, #18052, #18053, #18096, #18104)deploy.mov
See Using the Deploy Commands for additional information and code samples.
-
[Experimental] Add
@validate()decorator for custom validation (#17804) - requires theuserDefinedConstraintsfeature flag@validate(x => startsWith(x, 'foo')) // <-- Accepts 'food' or 'fool' but causes the deployment to fail if 'booed' was supplied param p string
-
Add loadDirectoryFileInfo function (#17241) - thanks @GABRIELNGBTUC !
This function returns an array of objects for each file in the directory for you to use in your Bicep template.var directoryInfo = loadDirectoryFileInfo('./directory') var directoryInfoWildcard = loadDirectoryFileInfo('./directory', '*.txt')
-
Add an explicit
anytype (#17848)
Adds a new type symbol (any). Anywhere type syntax is expected, users can now supplyany:param foo any output bar any = foo func cowSay(toSay any) string => 'The cow says, "${toSay}"'
-
Remove
moduleIdentityexperimental feature (#17909)module mod './module.bicep' = { identity: { type: 'UserAssigned' userAssignedIdentities: { '${mid.id}': {} } } }
Bug Fixes and Features
- Bicep MCP server
- Bicepparam
- Fix a bug where source files with extensions cannot be published (#17808)
- Check for Windows Style Absolute Paths (#17995)
- Add
experimentalFeaturesWarning(#17910) - Add "Creating a Local Extension with .NET" quickstart guide (#17726)
- Graph extension update dynamic types link (#17851)
- Automatically enable symbolic name compilation for resource/module collection access (#17861)
- [docs] Add information about trace verbosity (#18093)
- Do not require properties marked as readonly+required (#17913)
- Add & handle
readableScopes+writableScopesproperties (#17849) - Inline existing resources with runtime names (#17904)
- Bug fixes for moduleExtensionConfigs experimental feature. (#17860)
- Fix quickstart instructions (#17759)
- Fix broken local-deploy links (#17846)
- Increase local deploy job timeout (#18040)
- Avoid returning internal information for extensible resource snapshot (#18119)
Community Contributions
- feat: BRM Tool - Removed deprecated
pathFilterproperty from BRM version schema (#17720) - thanks @AlexanderSehr ! - Add fix to decompile desiredStateConfiguration resources (#17764) - thanks @Gijsreyn !
- Fix bicep decompile-params if file is different name (#17795) - thanks @Gijsreyn !
- Linter rule should exclude all metadata (#17667) - thanks @guimatheus92 !
v0.37.4
Highlights
- [Experimental] Bicep MCP server (#17519, #17572, #17607, #17712). See Using Bicep MCP Server in VS Code (Preview!) for usage information.
- [Experimental] Simplified C# authoring experience for Local Deploy extensions (#17557, #17616) - thanks @samirbanjanovic !
- See Creating a Local Extension with .NET for a minimal quickstart guide.
- GA release for the
externalInput()function (#17470) - [Requires the
localDeployExperimental feature] Simplify publishing process by supporting type discovery via gRPC (#17665) - Add "format" capability to
bicep jsonrpc(#17567) - [Requires the
moduleExtensionConfigsExperimental feature] Extension config assignment syntax updates and module aware extension config assignment (#17389)
Breaking Changes
bicep generate-params now preserves the specified output file extension
The command no longer overrides the output file extension when --outfile is specified.
Previously, the command would change the output file’s extension even if one was explicitly provided. For example:
bicep generate-params main.bicep --outfile main
bicep generate-params main.bicep --outfile main.txt
would all produce main.parameters.json, which was an unintentional behavior.
Starting with this release, the command preserves the file name exactly as specified:
bicep generate-params main.bicep --outfile main
bicep generate-params main.bicep --outfile main.txt
bicep generate-params main.bicep --outfile main.params.json
now produces main, main.txt, and main.params.json respectively.
Bugs and Features
- Use language version 2.0 for extensibility (#17714)
- Update short-circuiting linter to use nested deployment expander (#17334)
- Emit an error diagnostic when a secure output is dereferenced indirectly (#17453)
- Improve
reducetype inference (#17574) - Add stacks extensibility linting rule. Restrict syntax on config assignments. (#17654)
- Add control bar for visual designer (#17518)
- Remove deprecated CLI arguments (#17564)
Community Contributions
- Update params-file-grammar.md (#17510) - thanks @rgant !
- Add linter rule to warn on usage of outdated AzPowerShell version in deployment scripts (#17556) - thanks @guimatheus92 !
- Added references to the Azure Verified Module website and bicep-registry-module repository (#17664) - thanks @johnlokerse !
v0.36.177
Highlights
- Add Identity Snippets for Resources (#17335)
- Update Bicep linter diagnostics to point to https://aka.ms/bicep/linter-diagnostics (#17390)
- Mark conditional resources as nullable for the purposes of property access (#16987)
- Typing improvements for extensions (#17242)
Features and Bug Fixes
- Handle union type properly in use-secure-value-for-secure-inputs rule (#17372)
- Update Azure.Deployments.Templates to latest (#17375)
- Fix extension collection reference codegen (#17381)
- Detect usage of fully-qualified non-deterministic functions in resource identifiers (#17505)
- Remove auxiliary file size limit for local deploy (#17506)
- Add (WIP) visual designer and resource type explorer apps (#17503)
- Add DeployTimeConstant Flag for Module Identity (#17383)
- Support ES target for highlight.js (#17285)
- Only use
listOutputsWithSecureValuesto dereference secure outputs (#17423)
Snapshot command
- Add support for null-valued parameters to snapshot command (#17291)
- Use the target scope of the template file as the target scope of a params file (#17292)
- Surface cross-module validation errors in snapshot command as messages, not unhandled exceptions (#17378)
- Enable speculative reference evaluation in snapshot helper (#17512)
Community Contributions
- Correct Param & Var Declarations (#17511) - thanks @rgant !
- Add Dependabot configuration for .NET SDK updates (#17424) - thanks @JamieMagee !
- Type definition code base and associated unit tests (#17391) - thanks @samirbanjanovic !
v0.36.1
Highlights
- GA release for optional types in variables (#17055)
// current variable syntax var foo = 'hello' // new variable syntax with optional type var foo string = 'hello'
- Add
userPrincipalNametodeployer()function return type (#17099)
Example usage:var myUser = deployer().userPrincipalName
- [Experimental] New CLI command group
bicep snapshotfor snapshot validation. See Using thesnapshotcommand for usage information. - [Experimental] Local Deploy: Various improvements to support end-to-end scenarios (#17048, #17195, #17234, #17235, #17095)
- [Requires the
moduleIdentityExperimental feature] Support identity assignments on modules (#17150, #17233)
Example usage:Note that this is introduced for future capabilities, and is not currently supported by the backend service.param identityId string module mod './module.bicep' = { identity: { type: 'UserAssigned' userAssignedIdentities: { '${identityId}': {} } } }
- Bicep Extensibility feature flag has been removed (#17094)
Documentation available at Use Bicep Extensions
Fixes
- Fix completions for function arguments (#17146)
- Enable decompilation of KV reference in parameters json (#17196)
- Allow outer variable completions in user-defined functions (#17198)
- Handle case insensitive name clashes for imported variable, func, and type symbols (#17200)
- Add value bounds to loop index variable (#17201)
- Raise error diagnostic on ambiguous scope (#17202)
- Fix F12 for imported symbols from oci modules (#16941)
use-secure-value-for-secure-inputslinter rule: Remove some false positives (#17107)- adding cases to handle user defined typed params (#16864)
- adding completion support for 'extends' keyword (#17194)
- Fix F12 for imported symbols from oci modules (#16941)
Community Contributions
- Add linter rule to warn on unused compile-time imports (#16990) - thanks @GABRIELNGBTUC !
- Disable linter rule "Maximum number of variables used" when the file does not contain declarations used in files meant to deployed and variables are exported (#17149) - thanks @GABRIELNGBTUC !