Skip to content

Releases: Azure/bicep

v0.43.1

04 May 22:52
55c0aa4

Choose a tag to compare

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

  • @retryOn decorator is now GA! (#19454)

    Use the @retryOn decorator 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() and distinct() functions (#18990, #19167)

    Example usage:

    // outputs true if myInput contains 'Bar' 
    output wildcardMatch bool = like(myInput, '*Bar*')
    
    // outputs [1, 2, 3]
    output values string[] = distinct([1, 2, 2, 3, 1])
  • Add use-recognized-resource-type linter 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-name linter rule to enforce omitting explicit module names (optional - off by default) (#19556)

    The following code will emit a warning if enabled, because the module name property 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:
    • Include predicted outputs (#19379)
    • Support management group id parameter (#19378)
  • 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:
    • Add missing import and extension top-level completions in .bicepparam files (#19448)
    • extendable param files intellisense for shared bicepparam files (#19061)
    • enable build-params evaluation of for-expressions in .bicepparam (#18949)
  • MCP Server Improvements:
    • Convert MCP GetAzResourceTypeSchema output to standard JSON Schema format (#19388)
    • Extract Azure.Bicep.McpServer.Core library to enable building custom remote MCP servers (#19499)
    • Add MCP Tools to support Extension Resource Types (#19453)
  • Allow expressions in getSecret function (#19204)
  • Theme vscode-elements widgets in visualizer ExportToolbar (#19557)

Community Contributions

v0.42.1

02 Apr 17:54
caea930

Choose a tag to compare

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)
image

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):

image

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

27 Feb 02:10
3e403ea

Choose a tag to compare

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 for existing resources (#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-diagnostics and #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

v0.40.2

24 Jan 00:09
271b0e1

Choose a tag to compare

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() and this.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.json configuration:

    {
      "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:

    • Enable parameter files to evaluate variables from extended base parameters (#18626)
    • Add support for loadTextContent function in extendable parameter files (#18424)
  • 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 conditional metadata property (#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 InlineDependencyVisitor and dedicated FunctionFlag (#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

v0.39.26

17 Nov 20:35
1e90b06

Choose a tag to compare

Highlights

  • [Experimental] Enhancements to bicep console command:

    • Support load* functions (#18413)
    • Support types & functions (#18261)
    • Improve line break handling (#18320)
  • [Requires the multilineStringInterpolation Experimental 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 console for-loop expression limitations (#18269)
  • Update ARM JSON type loader to support optional type constraints (#18307)
  • Block the existing keyword for extension resources that have no readable scopes (#18260)
  • Document the list_avm_metadata Bicep 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 apiVersion field and it's no longer being emitted (#18365)

Community Contributions

v0.38.33

06 Oct 16:55
6bb5d5f

Choose a tag to compare

Bug Fixes

  • Fix for incorrect error diagnostic on policyDefinitions existing resource usage (#18169)
  • Fix regression on secure inline object types and resource-derived string and object types (#18170)
  • Bicep.RpcClient - use PipeReader & PipeWriter APIs (#18212)

v0.38.5

02 Oct 18:24
066c054

Choose a tag to compare

Bug Fixes and Features

  • Fix for incorrect error diagnostic on MSGraph existing resource usage (#18160)
  • Add library for interacting with Bicep CLI via JSONRPC (#18151)

v0.38.3

01 Oct 00:15
2b1a61d

Choose a tag to compare

Highlights

  • onlyIfNotExists GA! (#17996)

    @onlyIfNotExists()
    resource onlyDeployIfNotExists 'Microsoft...' = {
      name: 'example'
      location: 'eastus'
      properties: {
        ...
      }
    }
  • [Experimental] Interactive bicep console command for REPL functionality (#18152)

    console.mov

    See Using the Console Command for additional information.

  • [Experimental] Interactive bicep deploy, bicep what-if and bicep teardown commands (#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 the userDefinedConstraints feature 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 any type (#17848)
    Adds a new type symbol (any). Anywhere type syntax is expected, users can now supply any:

    param foo any
    output bar any = foo
    
    func cowSay(toSay any) string => 'The cow says, "${toSay}"'
  • Remove moduleIdentity experimental feature (#17909)

    module mod './module.bicep' = {
      identity: {
        type: 'UserAssigned'
        userAssignedIdentities: {
          '${mid.id}': {}
        }
      }
    }

Bug Fixes and Features

  • Bicep MCP server
    • Updated mcp experimental docs to show EXPERIMENTAL server name (#17754)
    • Add List AVM MCP Tool (#17845)
    • fixing typos in mcp server best practices file (#17855)
  • Bicepparam
    • Remove redundant checks for empty parameter assignments in parameter evaluation (#17807)
    • fix and add test for invalid parameter type (#17193)
    • implement "base" parameters support for extended bicepparam files (#17850)
  • 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 + writableScopes properties (#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 pathFilter property 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

01 Aug 16:35
27cc8db

Choose a tag to compare

Highlights

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 reduce type 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

07 Jul 18:39
09988bb

Choose a tag to compare

Highlights

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 listOutputsWithSecureValues to 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