Bicep language specification
Azure Bicep has its own language, so it is common to have a specification that defines the structure of a Bicep file. Let's start with its structure.
Structure
Any Bicep file can have one or multiple of each of the following declarations:
- Parameters
- Variables
- Resources
- Modules
- Outputs
Each of these items should be separated by a new line. You cannot have a comma or semicolon in a Bicep file as a separator. We will cover these items later in this book.
Whitespaces
Whitespaces and tabs are ignored in Bicep files. However, as we mentioned previously, a new line will have a meaning, even within object
properties or array
items.
Comments
You can provide comments by using a double slash (//
) for single-line comments and /*
and */
for multiline comments:
param bool isProd = true // this is a single line comment /* this is a multi line comment */
You also have all the different data types...