Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 5.54 KB

experimental-features.md

File metadata and controls

59 lines (39 loc) · 5.54 KB

Experimental Features

Warning

Experimental features should be enabled for testing purposes only, as there are no guarantees about the quality or stability of these features. Do not enable these settings for any production usage, or your production environment may be subject to breaking.

Bicep exposes experimental features as a means of previewing new functionality that hasn't yet been stabilized for general availability. This provides a valuable way for us to release functionality and collect feedback, without affecting existing users, or introducing features that may require breaking changes.

List of features

The following features can be optionally enabled through your bicepconfig.json file. For information on how to enable them, see Configure your Bicep environment.

assertions

Should be enabled in tandem with testFramework experimental feature flag for expected functionality. Allows you to author boolean assertions using the assert keyword comparing the actual value of a parameter, variable, or resource name to an expected value. Assert statements can only be written directly within the Bicep file whose resources they reference. For more information, see Bicep Experimental Test Framework.

extendableParamFiles

Enables the ability to extend bicepparam files from other bicepparam files. For more information, see Extendable Bicep Params Files.

extensibility

Allows Bicep to use an extensibility model to deploy non-ARM resources. Currently, we support Kubernetes extension (Bicep Kubernetes extension) and Microsoft Graph extension (Bicep templates for Microsoft Graph).

legacyFormatter

Enables code formatting with the legacy formatter. This feature flag is introduced to ensure a safer transition to the v2 formatter that implements a pretty-printing algorithm. It is intended for temporary use and will be phased out soon.

localDeploy

Enables local deployment capability. See Bicep Local Providers for more information.

resourceDerivedTypes

If enabled, templates can reuse resource types wherever a type is expected. For example, to declare a parameter foo that should be usable as the name of an Azure Storage account, the following syntax would be used: param foo resourceInput<'Microsoft.Storage/storageAccounts@2022-09-01'>.name. NB: Because resource types may be inaccurate in some cases, no constraints other than the ARM type primitive will be enforced on resource derived types within the ARM deployment engine. Resource-derived types will be checked by Bicep at compile time, but violations will be emitted as warnings rather than errors.

resourceInfoCodegen

Enables the 'resourceInfo' function for simplified code generation.

resourceTypedParamsAndOutputs

Enables the type for a parameter or output to be of type resource to make it easier to pass resource references between modules. This feature is only partially implemented. See Simplifying resource referencing.

secureOutputs

Permits the usage of the @secure() decorator for module outputs. This feature must have also been enabled in your Azure subscription or tenant, or the deployment will fail. See Add securestring support for template output type.

sourceMapping

Enables basic source mapping to map an error location returned in the ARM template layer back to the relevant location in the Bicep file.

symbolicNameCodegen

Allows the ARM template layer to use a new schema to represent resources as an object dictionary rather than an array of objects. This feature improves the semantic equivalence of the Bicep and ARM templates, resulting in more reliable code generation. Enabling this feature has no effect on the Bicep layer's functionality.

testFramework

Should be enabled in tandem with assertions experimental feature flag for expected functionality. Allows you to author client-side, offline unit-test test blocks that reference Bicep files and mock deployment parameters in a separate test.bicep file using the new test keyword. Test blocks can be run with the command bicep test <filepath_to_file_with_test_blocks> which runs all assert statements in the Bicep files referenced by the test blocks. For more information, see Bicep Experimental Test Framework.

typedVariables

Permits optional usage of types on variable declarations.

waitAndRetry

The feature introduces waitUntil and retryOn decorators on resource data type. waitUnitl() decorator waits for the resource until its usable based on the desired property's state. retryOn() will retry the deployment if one if the listed exception codes are encountered.

Other experimental functionality

publish-extension CLI Command

Command that allows the publishing of extensions to container registries. For more information, see Using the Publish Extension Command.

Deployment Pane

The Deployment Pane is a UI panel in VSCode that allows you to connect to your Azure subscription and execute validate, deploy & whatif operations and get instant feedback without leaving the editor. For more information, see Using the Deployment Pane.