You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/bicep-config-modules.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Module setting for Bicep config
3
3
description: Describes how to customize configuration values for modules in Bicep deployments.
4
4
ms.topic: conceptual
5
-
ms.date: 01/03/2022
5
+
ms.date: 04/08/2022
6
6
---
7
7
8
8
# Add module settings in the Bicep config file
@@ -99,6 +99,27 @@ For a template spec, use:
99
99
module stgModule 'ts/CoreSpecs:storage:v1' = {
100
100
```
101
101
102
+
An alias has been predefined for the [public module registry](./modules.md#path-to-module). To reference a public module, you can use the format:
103
+
104
+
```bicep
105
+
br/public:<file>:<tag>
106
+
```
107
+
108
+
You can override the public module registry alias definition in the bicepconfig.json file:
109
+
110
+
```json
111
+
{
112
+
"moduleAliases": {
113
+
"br": {
114
+
"public": {
115
+
"registry": "<your_module_registry>",
116
+
"modulePath": "<optional_module_path>"
117
+
}
118
+
}
119
+
}
120
+
}
121
+
```
122
+
102
123
## Credentials for publishing/restoring modules
103
124
104
125
To [publish](bicep-cli.md#publish) modules to a private module registry or to [restore](bicep-cli.md#restore) external modules to the local cache, the account must have the correct permissions to access the registry. You can configure the credential precedence for authenticating to the registry. By default, Bicep uses the credentials from the user authenticated in Azure CLI or Azure PowerShell. To customize the credential precedence, see [Add credential precedence to Bicep config](bicep-config.md#credential-precedence).
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/modules.md
+43-2Lines changed: 43 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,14 @@
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: 02/01/2022
5
+
ms.date: 04/08/2022
6
6
---
7
7
8
8
# Bicep modules
9
9
10
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.
11
11
12
-
To share modules with other people in your organization, create a [template spec](../templates/template-specs.md) 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](../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.
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:
@@ -77,6 +77,41 @@ For example, to deploy a file that is up one level in the directory from your ma
77
77
78
78
### File in registry
79
79
80
+
#### Public module registry
81
+
82
+
The public module registry is hosted in a Microsoft container registry (MCR). The source code and the modules are stored in [GitHub](https://github.com/azure/bicep-registry-modules). The [README file](https://github.com/azure/bicep-registry-modules#readme) in the GitHub repo lists the available modules and their latest versions:
83
+
84
+

85
+
86
+
Select the versions to see the available versions. You can also select **Code** to see the module source code, and open the Readme files.
87
+
88
+
There are only a few published modules currently. More modules are coming. If you like to contribute to the registry, see the [contribution guide](https://github.com/Azure/bicep-registry-modules/blob/main/CONTRIBUTING.md).
89
+
90
+
To link to a public registry module, specify the module path with the following syntax:
> For more information see aliases and configuring aliases later in this section.
112
+
113
+
#### Private module registry
114
+
80
115
If you've [published a module to a registry](bicep-cli.md#publish), you can link to that module. Provide the name for the Azure container registry and a path to the module. Specify the module path with the following syntax:
81
116
82
117
```bicep
@@ -97,6 +132,12 @@ The full path for a module in a registry can be long. Instead of providing the f
You can override the public alias in the bicepconfig.json file.
140
+
100
141
### File in template spec
101
142
102
143
After creating a [template spec](../bicep/template-specs.md), you can link to that template spec in a module. Specify the template spec in the following format:
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/private-module-registry.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
title: Create private registry for Bicep module
3
3
description: Learn how to set up an Azure container registry for private Bicep modules
4
4
ms.topic: conceptual
5
-
ms.date: 02/21/2022
5
+
ms.date: 04/01/2022
6
6
---
7
7
8
8
# Create private registry for Bicep modules
9
9
10
-
To share [modules](modules.md) within your organization, you can create a private module registry. You publish modules to that registry and give read access to users who need to deploy the modules. After the modules are shared in the registries, you can reference them from your Bicep files.
10
+
To share [modules](modules.md) within your organization, you can create a private module registry. You publish modules to that registry and give read access to users who need to deploy the modules. After the modules are shared in the registries, you can reference them from your Bicep files. To contribute to the public module registry, see the [contribution guide](https://github.com/Azure/bicep-registry-modules/blob/main/CONTRIBUTING.md).
11
11
12
12
To work with module registries, you must have [Bicep CLI](./install.md) version **0.4.1008 or later**. To use with Azure CLI, you must also have version **2.31.0 or later**; to use with Azure PowerShell, you must also have version **7.0.0** or later.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/quickstart-private-module-registry.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
---
2
2
title: Publish modules to private module registry
3
3
description: Publish Bicep modules to private module registry and use the modules.
4
-
ms.date: 01/04/2022
4
+
ms.date: 04/01/2022
5
5
ms.topic: quickstart
6
6
ms.custom: mode-api
7
7
#Customer intent: As a developer new to Azure deployment, I want to learn how to publish Bicep modules to private module registry.
8
8
---
9
9
10
10
# Quickstart: Publish Bicep modules to private module registry
11
11
12
-
Learn how to publish Bicep modules to private modules registry, and how to call the modules from your Bicep files. Private module registry allows you to share Bicep modules within your organization. To learn more, see [Create private registry for Bicep modules](./private-module-registry.md).
12
+
Learn how to publish Bicep modules to private modules registry, and how to call the modules from your Bicep files. Private module registry allows you to share Bicep modules within your organization. To learn more, see [Create private registry for Bicep modules](./private-module-registry.md). To contribute to the public module registry, see the [contribution guide](https://github.com/Azure/bicep-registry-modules/blob/main/CONTRIBUTING.md).
0 commit comments