
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 build
Related articles

Dec 08, 2021 - 2 min read
What's Bicep on Azure and why you should use it?
To generate resources automatically in Azure, you could either do Azure Resource Manager templates, which no one really wanted to do because …

Feb 07, 2021 - 1 min read
Loggen eigener Werte mit Azure Application Insights
Um eigene Werte in Application Insights loggen zu können, muss ein eigener ITelemetryInitializer erzeugt werden. Dieser dient nun dazu, dass …

Feb 05, 2021 - 1 min read
Loggen des User Agent mit Azure Application Insights
Standardmäßig wird der User-Agent des HTTP-Requests nicht von der Application Insights Middleware des ASP.NET SDKs gespeichert; vermutlich …
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.
