Bicep type system
One of the major benefits of Bicep over ARM templates is that it has native type support. This will not only help with validation and errors being caught early in the development cycle but also makes it easier to convert from Bicep into JSON since all the types are compatible.
Supported data types
The way Bicep supports data type assignability is defined based on the actual type rather than the object's name or characteristics. In other words, the structure of the object's type will determine its type, very much like how TypeScript
works. However, you need to keep in mind that although Bicep infers the type, it does not perform any automatic conversion, and everything should be defined explicitly.
Simple types
Here are the simple data types supported by Bicep:
any
: The value can be anything.error
: The expression contains an error.string
: The value is a string/text.number
: The type is still under development but would represent...