Modules
Similar to ARM templates, where you could break down a complex template into a nested template and simplify it, Azure Bicep also allows you to do the same using modules. A module in Bicep can contain one or more resources to be deployed together.
Modules help you hide the complexities of raw resource declaration in your main template and put them into separate files, which, in turn, helps with the increased readability in your main templates. This makes it easier to share these modules with other teams in your organization. Let's start by learning how to define modules.
Defining modules
In a sense, every Bicep file can be a module if it has input parameters and outputs that define its contract with the outside world. That said, both parameters and outputs are optional. The following is an example module that deploys a storage account:
@minLength(3) @maxLength(11) param storagePrefix string @allowed([ 'Standard_LRS' 'Premium_LRS...