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.
To create a bicepconfig.json file in Visual Studio Code, see Visual Studio Code.
Available settings
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. For more information, see Add module settings to Bicep config.
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.
You can also configure the 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.
Credential precedence
You can configure the credential precedence for authenticating to the registry. By default, Bicep uses the credentials from the user authenticated in Azure CLI or Azure PowerShell. To customize the credential precedence, add cloud and credentialPrecedence elements to the config file.
{
"cloud": {
"credentialPrecedence": [
"AzureCLI",
"AzurePowerShell"
]
}
}
The available credential types are:
- AzureCLI
- AzurePowerShell
- Environment
- ManagedIdentity
- VisualStudio
- VisualStudioCode
Intellisense
The Bicep extension for Visual Studio Code supports intellisense for your bicepconfig.json file. Use the intellisense to discover available properties and values.
Next steps
Povratne informacije
Pošalјite i prikažite povratne informacije za