github Azure/bicep v0.49.2

56 minutes ago

Features and bug fixes

CLI and module restore

  • Add --config <path> to the Bicep CLI (#20412)
    • Use the specified configuration instead of bicepconfig.json discovery for every file loaded by the command, including the entrypoint, local modules, and using targets.
    bicep build main.bicep --config bicepconfig.prod.json
    • Support extends and merge the configuration over the built-in defaults. A missing file fails the command rather than falling back to discovery. See REP 0029.
    // bicepconfig.prod.json
    {
      "extends": "./bicepconfig.json",
      "analyzers": {
        "core": {
          "rules": {
            "no-unused-params": { "level": "error" }
          }
        }
      }
    }
  • Retry previously failed modules on a forced restore (#20472)
    • "Restore Bicep Modules (Force)" and bicep restore --force now retry recently failed modules instead of continuing to report the earlier failure.

Linting and version constraints

  • Add linter rules for cross-file bicep.version constraints (#20337)
    • no-conflicting-version-constraints (error by default): report when no single Bicep version satisfies the constraints across an entrypoint and its local modules.
    • no-incompatible-entrypoint-version (warning by default): report when the entrypoint's constraint allows a version that a referenced file rejects.
  • Suppress redundant BCP104 diagnostics in VS Code when a referenced file's only error is a version constraint mismatch (BCP456) (#20388)
  • Update deployment script Az PowerShell guidance (#20396)
    • Raise the linter's default minimum version to 15.0 and use version 16.2 in the deployment script snippet.

Visualizer

  • Add support for matching the active VS Code color theme (#20395)
    • Enable with the new bicep.visualizer.matchColorTheme setting (off by default).
ThemeMatching
  • Add collapsible modules and improve edge rendering (#20409, #20442, #20467)
    • Collapse a module into a single card and expand it again without editing the Bicep source. Both actions support undo.
    • Draw edges below the nodes they connect rather than over unrelated nodes.
  • Add support for expanding registry modules published with source (#20471)
    • Restore registry modules on demand when expanded, and open their published source when a node is selected.
ModuleExpansion

Compiler and decompilation

  • Block @sealed() on resource-derived types accessed through expressions, aliases, and imports (#20389)
    • These previously compiled to templates that rejected every non-empty value at deployment time.
  • Fix the WebAssembly decompilation API to return all generated files, not just the entrypoint (#20387)

Dependencies

  • Update Azure Deployments packages to 1.812.0 (#20444)

Community contributions

Full Changelog: Comparing v0.48.1...v0.49.2 · Azure/bicep

Don't miss a new bicep release

NewReleases is sending notifications on new releases.