Configure your Bicep environment

Bicep supports a configuration file named bicepconfig.json. Within this file, you can add values that customize your Bicep development experience. If you don't add this file, Bicep uses default values.

To customize values, create this file in the directory where you store Bicep files. You can add bicepconfig.json files in multiple directories. The configuration file closest to the Bicep file in the directory hierarchy is used.

Create the config file in Visual Studio Code

You can use any text editor to create the config file.

To create a bicepconfig.json file in Visual Studio Code, open the Command Palette ([CTRL/CMD]+[SHIFT]+P), and then select Bicep: Create Bicep Configuration File. For more information, see Create Bicep configuration file.

Screenshot of how to create Bicep configuration file in VSCode.

The Bicep extension for Visual Studio Code supports intellisense for your bicepconfig.json file. Use the intellisense to discover available properties and values.

Screenshot of the intellisense support in configuring bicepconfig.json.

Configure Bicep modules

When working with modules, you can add aliases for module paths. These aliases simplify your Bicep file because you don't have to repeat complicated paths. You can also configure cloud profile and credential precedence for authenticating to Azure from Bicep CLI and Visual Studio Code. The credentials are used to publish modules to registries and to restore external modules to the local cache when using the insert resource function. For more information, see Add module settings to Bicep config.

Configure Linter rules

The Bicep linter checks Bicep files for syntax errors and best practice violations. You can override the default settings for the Bicep file validation by modifying bicepconfig.json. For more information, see Add linter settings to Bicep config.

Enable experimental features

You can enable preview features by adding:

  "experimentalFeaturesEnabled": {
    "userDefinedTypes": true,
    "extensibility": true

The preceding sample enables 'userDefineTypes' and 'extensibility`. The available experimental features include:

  • extensibility: Allows Bicep to use a provider model to deploy non-ARM resources. Currently, we only support a Kubernetes provider. See Bicep extensibility Kubernetes provider.
  • paramsFiles: Allows for the use of a Bicep-style parameters file with a terser syntax than the JSON equivalent parameters file. Currently, you also need a special build of Bicep to enable this feature, so is it inaccessible to most users. See Parameters - first release.
  • 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.
  • 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.
  • 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 equivalent of the Bicep and ARM templates, resulting in more reliable code generation. Enabling this feature has no effect on the Bicep layer's functionality.
  • userDefinedTypes: Allows you to define your own custom types for parameters. See User-defined types in Bicep.

Next steps