github Azure/bicep v0.41.2

5 hours ago

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

Don't miss a new bicep release

NewReleases is sending notifications on new releases.