Bicep file structure
Bicep has its own syntax and structure for defining Azure resources in a simple and readable manner. The basic structure of an Azure Bicep file consists of the following:
- Metadata: A JSON object that defines the version of the Bicep language and any other metadata
- Variables: A section where you can declare variables to be used in the deployment
- Parameters: A section where you can define the input parameters required to deploy the resources
- Resources: A section where you can define the Azure resources you want to deploy
- Outputs: A section where you can define outputs that can be used to refer to the values of resources created during deployment
Figure 11.2 – A Bicep file that creates a storage account
Similar to ARM templates, you can define parameters, variables, resources, child resources, extensions, and even dependencies in your Bicep file. More advanced functionality, such as loops, conditions...