ARM and Bicep syntax comparison
Bicep has some syntax in common with ARM templates, though some simplifications have been made, as shown in the following table:
Now, let's look at some points you need to keep in mind if you wish to have a better coding standard in your team and cleaner templates.
Best practices for Bicep syntax
There are points you need to be cautious of regarding the Bicep syntax. First things first, avoid using reference
or referenceId
unless it's necessary. Your dependencies will either be implicitly inferred when you use a property of a resource or you use the dependsOn
attribute.
Next, choose a casing standard for your team and stick with it. Many folks like camel case, and that is what the Bicep team uses as well:
var myCamelCaseVariable = 'Hi there!'
And last but not least, if you intend to add a description to a parameter, make sure it outlines what this parameter is used for to prevent confusion...