|
2 | 2 | title: Bicep modules
|
3 | 3 | description: Describes how to define a module in a Bicep file, and how to use module scopes.
|
4 | 4 | ms.topic: conceptual
|
5 |
| -ms.date: 04/08/2022 |
| 5 | +ms.date: 05/10/2022 |
6 | 6 | ---
|
7 | 7 |
|
8 | 8 | # Bicep modules
|
9 | 9 |
|
10 |
| -Bicep enables you to organize deployments into modules. A module is just a Bicep file that is deployed from another Bicep file. With modules, you improve the readability of your Bicep files by encapsulating complex details of your deployment. You can also easily reuse modules for different deployments. |
| 10 | +Bicep enables you to organize deployments into modules. A module is a Bicep file (or an ARM JSON template) that is deployed from another Bicep file. With modules, you improve the readability of your Bicep files by encapsulating complex details of your deployment. You can also easily reuse modules for different deployments. |
11 | 11 |
|
12 |
| -To share modules with other people in your organization, create a [template spec](../templates/template-specs.md), [public registry](https://github.com/Azure/bicep-registry-modules), or [private registry](private-module-registry.md). Template specs and modules in the registry are only available to users with the correct permissions. |
| 12 | +To share modules with other people in your organization, create a [template spec](../bicep/template-specs.md), [public registry](https://github.com/Azure/bicep-registry-modules), or [private registry](private-module-registry.md). Template specs and modules in the registry are only available to users with the correct permissions. |
13 | 13 |
|
14 | 14 | > [!TIP]
|
15 | 15 | > The choice between module registry and template specs is mostly a matter of preference. There are a few things to consider when you choose between the two:
|
@@ -41,9 +41,13 @@ So, a simple, real-world example would look like:
|
41 | 41 |
|
42 | 42 | ::: code language="bicep" source="~/azure-docs-bicep-samples/syntax-samples/modules/local-file-definition.bicep" :::
|
43 | 43 |
|
| 44 | +You can also use an ARM JSON template as a module: |
| 45 | + |
| 46 | +::: code language="bicep" source="~/azure-docs-bicep-samples/syntax-samples/modules/local-file-definition-json.bicep" ::: |
| 47 | + |
44 | 48 | Use the symbolic name to reference the module in another part of the Bicep file. For example, you can use the symbolic name to get the output from a module. The symbolic name may contain a-z, A-Z, 0-9, and underscore (`_`). The name can't start with a number. A module can't have the same name as a parameter, variable, or resource.
|
45 | 49 |
|
46 |
| -The path can be either a local file or a file in a registry. For more information, see [Path to module](#path-to-module). |
| 50 | +The path can be either a local file or a file in a registry. The local file can be either a Bicep file or an ARM JSON template. For more information, see [Path to module](#path-to-module). |
47 | 51 |
|
48 | 52 | The **name** property is required. It becomes the name of the nested deployment resource in the generated template.
|
49 | 53 |
|
|
0 commit comments