Releases: Azure/bicep
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 console
command for REPL functionality (#18152)console.mov
See Using the Console Command for additional information.
-
[Experimental] Interactive
bicep deploy
,bicep what-if
andbicep 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 theuserDefinedConstraints
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 supplyany
: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
- 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
+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
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
localDeploy
Experimental feature] Simplify publishing process by supporting type discovery via gRPC (#17665) - Add "format" capability to
bicep jsonrpc
(#17567) - [Requires the
moduleExtensionConfigs
Experimental 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
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
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
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
- 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
userPrincipalName
todeployer()
function return type (#17099)
Example usage:var myUser = deployer().userPrincipalName
- [Experimental] New CLI command group
bicep snapshot
for snapshot validation. See Using thesnapshot
command for usage information. - [Experimental] Local Deploy: Various improvements to support end-to-end scenarios (#17048, #17195, #17234, #17235, #17095)
- [Requires the
moduleIdentity
Experimental 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-inputs
linter 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 !
v0.35.1
Highlights
-
GA release for the
@secure()
decorator on module outputs! You can now output secure values from a child module and read them in a parent module. (#16796) -
Visual Studio Bicep extension support for
.bicepparam
files! (#16861) -
New functions for working with URIs -
parseUri()
andbuildUri()
(#16802)
Example usage:/* Returns { scheme: 'https' host: 'example.com' port: 1234 path: '/foo/bar' } */ output parsedUri object = parseUri('https://example.com:1234/foo/bar') /* Returns: 'https://example.com:1234/foo/bar' */ output builtUri string = buildUri({ scheme: 'https' host: 'example.com' port: 1234 path: 'foo/bar' })
-
New functions for working with Availaiblity Zones (#16985)
toLogicalZone()
- converts physical zones to logical zonestoPhysicalZone()
- converts logical zones to physical zones- Array versions for bulk conversions (toLogicalZones() & toPhysicalZones())
var subscriptionId = subscription().subscriptionId var location = 'westus2' /* Returns the physical AZ corresponding to the specified logical AZ in the specified subscription and location. For westus2 location, this will be one of 'westus2-az1', 'westus2-az2', 'westus2-az3' depending on the subscription. */ output singlePhysicalZone string = toPhysicalZone(subscriptionId, location, '1') /* Returns an array of physical AZs corresponding to the specified logical AZs in the specified subscription and location. */ output physicalZones string[] = toPhysicalZones(subscriptionId, location, ['1', '2']) /* Returns the logical AZ corresponding to the specified physical AZ in the specified subscription and location. Returns '1', '2', or '3' depending on the subscription. */ output singleLogicalZone string = toLogicalZone(subscriptionId, location, 'westus2-az2') /* Returns an array of logical AZs corresponding to the specified physical AZs in the specified subscription and location. */ output logicalZones string[] = toLogicalZones(subscriptionId, location, [ 'westus2-az1' 'westus2-az2' ])
-
use-secure-value-for-secure-inputs
linter rule: Use resource type information to catch more unsafe passing of non-secure values (#16873) -
[requires the
onlyIfNotExists
experimental feature] Resource Existence Checks using@onlyIfNotExists()
decorator (#16655)
Attaching this decorator to a resource declaration means deployment of the resource will only take place if it hasn't already been deployed. Example usage:@onlyIfNotExists() resource onlyDeployIfNotExists 'Microsoft...' = { name: 'example' location: 'eastus' properties: { ... } }
-
[requires the
typedVariables
experimental feature] Support importing and declaring types in .bicepparam files with typedVariables decorator (#16929)- Allow usage of the type keyword in .bicepparam files
- Allow importing types from .bicep files in .bicepparam files
- Allow usage of inline types in .bicepparam files
-
[requires the
externalInputFunction
experimental feature] External Input function -externalInput
function to allow reading input that will be resolved later by external tooling in order to inject values at deployment time. (#16726)
Bugs and Features
- Decompiler support for user-defined functions (#16883)
use-parent-property
linter rule: Fix incorrect warning with blobContainer and fileShare (#16738)- Raise diagnostic for unsupported usage of spread (#16739)
- Add friendly name to Playground link (#16803)
- Revert #16442 - Fixed bug VSCode extension does not read values from parameter file (#16789)
no-hardcoded-env-urls
linter rule: Remove URLs not present inenvironment()
function output (#16863)- Fix for intellisense of symbols inside import statement (#16936)
- fixing
dotnet format
issues, and addressingIDE0305: Collection initialization can be simplified
errors/warnings (#16808) - Use symbolic name for list function calls (#16862)
- Enhance
substring
type inference - updated parameter types for substring to infer acceptable ranges based on the other arguments provided to the function. (#16859) - Prevent infinite recursion during type narrowing (#17028)
- Fix command binding comment in bicepconfig.json (#16807)
use-resource-id-functions
linter rule: Set to off by default (#16869)
.bicepparam Bug Fixes
- Suggest the experimental feature on the extends keyword for extendableparamfiles (#16744)
- adding checks to ensure the given file exists before building the bicepparam file (#16742)
- Clarifying parameter file generation logic and error message (#16662)
Local Deploy
- Local Deploy: process kill should be best-effort only (#16786)
- Local Deploy: Support deploying Azure modules (#16752)
- Local Deploy: Support long-running operations for local and Azure modules (#16797)
- Documentation: Replace deploy pane content with link to MSDocs (#16736)
- Local deploy: ensure languageversion 2.2-experimental emitting is enabled (#16945)
Community Contributions
v0.34.44
Features and Bug Fixes
- Use languageVersion 2.0 when an existing resource has an explicit dependency (#16670)
- Validate regex patterns against non-backtracking engine (#16687)
- Generate deterministic dependsOn (#16668)
- Add more detailed information about local-deploy (#16677)
- Add more info on implementing extensions for local-deploy (#16678)
- Add name pattern validation for modules (#16680)
- Add Desired State Configuration target scope and experimental feature flag (#16389) - thanks @andyleejordan !
v0.34.1
Highlights
- Optional Module Names GA (#16518)
module storage 'storageaccount.bicep' = { // no need to specify a name here! scope: rg params: { location: location sku: skuProd } }
- Experimental support for typed variables (#16451) using the feature flag "typedVariables"
// an optional type can be added to a variable declaration statement. // current syntax var foo = 'hello' // with optional type var foo string = 'hello'
- Resource Derived Types GA (#16517)
param storageSkuName resourceInput<'Microsoft.Storage/storageAccounts@2024-01-01'>.sku.name output storageEndpoints resourceOutput<'Microsoft.Storage/storageAccounts@2024-01-01'>.properties.primaryEndpoints = ...
- ACR Private Module Completions (#16051)
- Add Notepad++ Bicep Syntax Highlighting Information (#16506) - thanks @richardsondev !
Bug Fixes and Features
secure-secrets-in-params
: Flag insecure references to secure params (#16251)- Add code action to suggest multi-line strings (#16296)
- Handle decompilation of variable-defined API version correctly (#16384)
- Support dark + light mode in the Bicep playground (#16388)
- Support for validating inputs in deploy pane (#16442)
- Add the --pattern CLI argument for faster batch operations on multiple files (#16456)
# build all .bicep files under current path bicep build --pattern './**/*.bicep' # build all .bicepparam files under current path bicep build-params --pattern './**/*.bicepparam' # format all .bicep files under current path bicep format --pattern './**/*.bicep*' # lint all .bicep files under current path bicep lint --pattern './**/*.bicep' # restore modules for all .bicep files under current path bicep restore --pattern './**/*.bicep'
- Fix for completions inside object (#16558)
- Imported functions invoked in .bicepparam files can refer to variables from their source template (#16322)
- Emit an info-level diagnostic on safe access of undeclared property (#16327)
- Forward base-type errors when accessing type properties (#16394)
- Allow duplicated resources (by name) if at most one is unconditional (#15909)
- Index from end operator (
[^]
) (#16104)param foo string[] var lastElement = foo[^1] var secondLastElement = foo[^2]
- Partially parse function calls with no closing paren (#16508)
- Fix 13606, stuck in ext-src loop (#16381)
v0.33.93
Highlights
- Address v0.33.13 language server crash/stack overflow (#16235)
- Address v0.33.13 deployment failures when depending on looped resources in non-symbolic name templates (#16236)
- Release Deployment Pane as a non-experimental feature (#16173)
Other bugs and features
- Offer code fix to fully qualify function call for shadowed decorator functions (#16116)