
This article was written in 2022. Versions, tools and recommendations may have changed since then. Newer posts are collected under Azure.
Bicep scripts are ideally part of the source code and can also be used as such in the build process of the application.
This allows us to perform potential bugs in bicep scripts and modules during the build, well before the script actually runs and generates Azure resources. This increases quality and reduces error rates.
Bicep build to validate
Conveniently, validation is already built into Bicep and occurs during the build command.
1➡ az bicep build --file ./.bicep/main.bicep
2C:\source\ba\demo\bicep\main.bicep(8,7) : Warning no-unused-params: Parameter "storageName" is declared but never used.
3C:\source\ba\demo\bicep\main.bicep(57,38) : Error BCP052: The type "outputs" does not contain property "planId".Azure DevOps Pipeline Task
The Azure CLI can now be easily used for example in Azure DevOps to validate via the build command.
1 - script: az bicep build --file ./.bicep/main.bicep
2 displayName: Bicep buildRelated articles

- 4 min read
Provision Microsoft Fabric with Azure Bicep
Overview Microsoft Fabric consolidates analytics workloads (including Power BI) on a tenant-wide capacity. These Fabric capacities (SKUs …

- 1 min read
Easy handling of optional Azure Web App settings in Bicep
Often you don’t need all the configurations of an app per stage; sometimes they are optional. This is often the case for the …

- 1 min read
Avoid hardcoded Microsoft URLs with Bicep environments
Bicep has a great feature, which meanwhile also leads to warnings during execution if you don’t pay attention to it: the avoidance of …
Let's Work Together
Looking for an experienced Platform Architect or Engineer for your next project? Whether it's cloud migration, platform modernization or building new solutions from scratch - I'm here to help you succeed.
