Skip to content

Commit f278365

Browse files
authored
Merge pull request #277753 from mumian/0606-avm
Use AVM
2 parents 073c6e2 + a5649c4 commit f278365

9 files changed

+59
-38
lines changed

articles/azure-resource-manager/bicep/bicep-config-modules.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Module setting for Bicep config
33
description: Describes how to customize configuration values for modules in Bicep deployments.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 02/16/2024
6+
ms.date: 06/28/2024
77
---
88

99
# Add module settings in the Bicep config file
@@ -100,13 +100,16 @@ For a template spec, use:
100100
module stgModule 'ts/CoreSpecs:storage:v1' = {
101101
```
102102

103-
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+
An alias has been predefined for [public modules](./modules.md#file-in-registry). To reference a public module, you can use the format:
104104

105105
```bicep
106106
br/public:<file>:<tag>
107107
```
108108

109-
You can override the public module registry alias definition in the bicepconfig.json file:
109+
> [!NOTE]
110+
> Non-AVM (Azure Verified Modules) modules are retired from the public module registry with most of them available as AVM modules.
111+
112+
You can override the public module registry alias definition in the [bicepconfig.json file](./bicep-config.md):
110113

111114
```json
112115
{

articles/azure-resource-manager/bicep/bicep-using.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Using statement
33
description: Describes how to use the using statement in Bicep.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 10/11/2023
6+
ms.date: 06/28/2024
77
---
88

99
# Using statement
@@ -29,7 +29,7 @@ The `using` statement in [Bicep parameter files](./parameter-files.md) ties the
2929
using '<path>/<file-name>.json'
3030
```
3131

32-
- To use public module:
32+
- To use [public modules](./modules.md#path-to-module):
3333

3434
```bicep
3535
using 'br/public:<file-path>:<tag>'
@@ -38,7 +38,7 @@ The `using` statement in [Bicep parameter files](./parameter-files.md) ties the
3838
For example:
3939

4040
```bicep
41-
using 'br/public:storage/storage-account:3.0.1'
41+
using 'br/public:avm/res/storage/storage-account:0.9.0'
4242
4343
param name = 'mystorage'
4444
```
27.2 KB
Loading
6.25 KB
Loading
25 KB
Loading

articles/azure-resource-manager/bicep/modules.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ title: Bicep modules
33
description: Describes how to define a module in a Bicep file, and how to use module scopes.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 02/02/2024
6+
ms.date: 06/28/2024
77
---
88

99
# Bicep modules
1010

11-
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+
Bicep enables you to organize deployments into modules. A module is a Bicep file (or an Azure Resource Manager 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.
1212

13-
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+
To share modules with other people in your organization, create a [template spec](../bicep/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.
1414

1515
> [!TIP]
1616
> 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:
@@ -19,7 +19,7 @@ To share modules with other people in your organization, create a [template spec
1919
> - Content in the Bicep module registry can only be deployed from another Bicep file. Template specs can be deployed directly from the API, Azure PowerShell, Azure CLI, and the Azure portal. You can even use [`UiFormDefinition`](../templates/template-specs-create-portal-forms.md) to customize the portal deployment experience.
2020
> - Bicep has some limited capabilities for embedding other project artifacts (including non-Bicep and non-ARM-template files. For example, PowerShell scripts, CLI scripts and other binaries) by using the [`loadTextContent`](./bicep-functions-files.md#loadtextcontent) and [`loadFileAsBase64`](./bicep-functions-files.md#loadfileasbase64) functions. Template specs can't package these artifacts.
2121
22-
Bicep modules are converted into a single Azure Resource Manager template with [nested templates](../templates/linked-templates.md#nested-template). For more information about how Bicep resolves configuration files and how Bicep merge user-defined configuration file with the default configuration file, see [Configuration file resolution process](./bicep-config.md#understand-the-file-resolution-process) and [Configuration file merge process](./bicep-config.md#understand-the-merge-process).
22+
Bicep modules are converted into a single Azure Resource Manager template with [nested templates](../templates/linked-templates.md#nested-template). For more information about how Bicep resolves configuration files and how Bicep merges user-defined configuration file with the default configuration file, see [Configuration file resolution process](./bicep-config.md#understand-the-file-resolution-process) and [Configuration file merge process](./bicep-config.md#understand-the-merge-process).
2323

2424
### Training resources
2525

@@ -81,7 +81,7 @@ Like resources, modules are deployed in parallel unless they depend on other mod
8181

8282
## Path to module
8383

84-
The file for the module can be either a local file or an external file. The external file can be in template spec or a Bicep module registry. All of these options are shown below.
84+
The file for the module can be either a local file or an external file. The external file can be in template spec or a Bicep module registry.
8585

8686
### Local file
8787

@@ -95,30 +95,42 @@ For example, to deploy a file that is up one level in the directory from your ma
9595

9696
#### Public module registry
9797

98-
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). To view the available modules and their versions, see [Bicep registry Module Index](https://aka.ms/br-module-index).
98+
> [!NOTE]
99+
> Non-AVM (Azure Verified Modules) modules are retired from the public module registry.
100+
101+
[Azure Verified Modules](https://azure.github.io/Azure-Verified-Modules/) are prebuilt, pretested, and preverified modules for deploying resources on Azure. Created and owned by Microsoft employees, these modules are designed to simplify and accelerate the deployment process for common Azure resources and configurations whilst also aligning to best practices; such as the Well-Architected Framework.
99102

100-
:::image type="content" source="./media/modules/bicep-public-module-registry-modules.png" alt-text="The screenshot of public module registry.":::
103+
Browse to the [Azure Verified Modules Bicep Index](https://azure.github.io/Azure-Verified-Modules/indexes/bicep/)to see the list of modules available, select the highlighted numbers in the following screenshot to be taken directly to that filtered view.
101104

102-
Select the versions to see the available versions. You can also select **Source code** to see the module source code, and open the Readme files.
105+
:::image type="content" source="./media/modules/bicep-azure-verified-modules-avm.png" alt-text="The screenshot of Azure Verified Modules (AVM).":::
103106

104-
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).
107+
The module list shows the latest version. Select the version number to see a list of available versions:
105108

106-
To link to a public registry module, specify the module path with the following syntax:
109+
:::image type="content" source="./media/modules/bicep-azure-verified-modules-avm-version.png" alt-text="The screenshot of Azure Verified Modules(AVM) versions.":::
110+
111+
To link to a public module, specify the module path with the following syntax:
107112

108113
```bicep
109114
module <symbolic-name> 'br/public:<file-path>:<tag>' = {}
110115
```
111116

112-
- **br/public** is the alias for the public module registry. This alias is predefined in your configuration.
117+
- **br/public** is the alias for public modules. You can customize this alias in the [Bicep configuration file](./bicep-config-modules.md).
113118
- **file path** can contain segments that can be separated by the `/` character.
114119
- **tag** is used for specifying a version for the module.
115120

116121
For example:
117122

118-
::: code language="bicep" source="~/azure-docs-bicep-samples/syntax-samples/modules/registry-definition-public.bicep" highlight="1" :::
123+
```bicep
124+
module storage 'br/public:avm/res/storage/storage-account:0.9.0' = {
125+
name: 'myStorage'
126+
params: {
127+
name: 'store${resourceGroup().name}'
128+
}
129+
}
130+
```
119131

120132
> [!NOTE]
121-
> **br/public** is the alias for the public registry. It can also be written as
133+
> **br/public** is the alias for public modules. It can also be written as:
122134
>
123135
> ```bicep
124136
> module <symbolic-name> 'br:mcr.microsoft.com/bicep/<file-path>:<tag>' = {}
@@ -149,7 +161,14 @@ The full path for a module in a registry can be long. Instead of providing the f
149161

150162
An alias for the public module registry has been predefined:
151163

152-
::: code language="bicep" source="~/azure-docs-bicep-samples/syntax-samples/modules/alias-definition-public.bicep" highlight="1" :::
164+
```bicep
165+
module storage 'br/public:avm/res/storage/storage-account:0.9.0' = {
166+
name: 'myStorage'
167+
params: {
168+
name: 'store${resourceGroup().name}'
169+
}
170+
}
171+
```
153172

154173
You can override the public alias in the bicepconfig.json file.
155174

articles/azure-resource-manager/bicep/parameter-files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Create parameters files for Bicep deployment
33
description: Create parameters file for passing in values during deployment of a Bicep file.
44
ms.topic: how-to
55
ms.custom: devx-track-bicep
6-
ms.date: 04/01/2024
6+
ms.date: 06/28/2024
77
---
88

99
# Create parameters files for Bicep deployment
@@ -43,7 +43,7 @@ using './azuredeploy.json'
4343
```
4444

4545
```bicep
46-
using 'br/public:storage/storage-account:3.0.1'
46+
using 'br/public:avm/res/storage/storage-account:0.9.0'
4747
...
4848
```
4949

articles/azure-resource-manager/bicep/private-module-registry.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ title: Create private registry for Bicep module
33
description: Learn how to set up an Azure container registry for private Bicep modules
44
ms.topic: how-to
55
ms.custom: devx-track-bicep
6-
ms.date: 05/10/2024
6+
ms.date: 06/28/2024
77
---
88

99
# Create private registry for Bicep modules
1010

11-
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+
To share [modules](modules.md) within your organization, you can create a private module registry. You can then 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 use public modules, see [Bicep Modules](./modules.md#file-in-registry).
1212

1313
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.
1414

@@ -55,7 +55,7 @@ A Bicep registry is hosted on [Azure Container Registry (ACR)](../../container-r
5555
5656
## Publish files to registry
5757
58-
After setting up the container registry, you can publish files to it. Use the [publish](bicep-cli.md#publish) command and provide any Bicep files you intend to use as modules. Specify the target location for the module in your registry. The publish command will create an ARM template which will be stored in the registry. This means if publishing a Bicep file that references other local modules, these modules will be fully expanded as one JSON file and published to the registry.
58+
After setting up the container registry, you can publish files to it. Use the [publish](bicep-cli.md#publish) command and provide any Bicep files you intend to use as modules. Specify the target location for the module in your registry. The publish command creates an ARM template, which is stored in the registry. This means if publishing a Bicep file that references other local modules, these modules are fully expanded as one JSON file and published to the registry.
5959
6060
# [PowerShell](#tab/azure-powershell)
6161
@@ -91,11 +91,11 @@ az bicep publish --file storage.bicep --target br:exampleregistry.azurecr.io/bic
9191

9292
---
9393

94-
With the with source switch, you see an additional layer in the manifest:
94+
With the with source switch, you see another layer in the manifest:
9595

9696
:::image type="content" source="./media/private-module-registry/bicep-module-with-source-manifest.png" lightbox="./media/private-module-registry/bicep-module-with-source-manifest.png" alt-text="Screenshot of bicep module registry with source.":::
9797

98-
Note that if the Bicep module references a module in a Private Registry, the ACR endpoint will be visible. To hide the full endpoint, you can configure an alias for the private registry.
98+
If the Bicep module references a module in a Private Registry, the ACR endpoint is visible. To hide the full endpoint, you can configure an alias for the private registry.
9999

100100
## View files in registry
101101

@@ -105,9 +105,9 @@ To see the published module in the portal:
105105
1. Search for **container registries**.
106106
1. Select your registry.
107107
1. Select **Services** -> **Repositories** from the left menu.
108-
1. Select the module path (repository). In the preceding example, the module path name is **bicep/modules/storage**.
108+
1. Select the module path (repository). In the preceding example, the module path name is **bicep/modules/storage**.
109109
1. Select the tag. In the preceding example, the tag is **v1**.
110-
1. The **Artifact reference** matches the reference you'll use in the Bicep file.
110+
1. The **Artifact reference** matches the reference you use in the Bicep file.
111111

112112
![Bicep module registry artifact reference](./media/private-module-registry/bicep-module-registry-artifact-reference.png)
113113

@@ -116,7 +116,7 @@ You're now ready to reference the file in the registry from a Bicep file. For ex
116116
---
117117
## Working with Bicep registry files
118118

119-
When leveraging bicep files that are hosted in a remote registry, it's important to understand how your local machine will interact with the registry. When you first declare the reference to the registry, your local editor will try to communicate with the Azure Container Registry and download a copy of the registry to your local cache.
119+
When using bicep files that are hosted in a remote registry, it's important to understand how your local machine interacts with the registry. When you first declare the reference to the registry, your local editor tries to communicate with the Azure Container Registry and download a copy of the registry to your local cache.
120120

121121
The local cache is found in:
122122

@@ -138,17 +138,16 @@ The local cache is found in:
138138
~/.bicep
139139
```
140140
141-
Any changes made to the remote registry will not be recognized by your local machine until a `restore` has been ran with the specified file that includes the registry reference.
141+
Your local machine can recognize any changes made to the remote registry until you run a `restore` with the specified file that includes the registry reference.
142142
143143
```azurecli
144144
az bicep restore --file <bicep-file> [--force]
145145
```
146146

147-
For more information refer to the [`restore` command.](bicep-cli.md#restore)
148-
147+
For more information, see the [`restore` command.](bicep-cli.md#restore)
149148

150149
## Next steps
151150

152-
* To learn about modules, see [Bicep modules](modules.md).
153-
* To configure aliases for a module registry, see [Add module settings in the Bicep config file](bicep-config-modules.md).
154-
* For more information about publishing and restoring modules, see [Bicep CLI commands](bicep-cli.md).
151+
- To learn about modules, see [Bicep modules](modules.md).
152+
- To configure aliases for a module registry, see [Add module settings in the Bicep config file](bicep-config-modules.md).
153+
- For more information about publishing and restoring modules, see [Bicep CLI commands](bicep-cli.md).

articles/azure-resource-manager/bicep/quickstart-private-module-registry.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
title: Publish modules to private module registry
33
description: Publish Bicep modules to private module registry and use the modules.
4-
ms.date: 06/20/2024
4+
ms.date: 06/28/2024
55
ms.topic: quickstart
66
ms.custom: mode-api, devx-track-bicep
77
#Customer intent: As a developer new to Azure deployment, I want to learn how to publish Bicep modules to private module registry.
88
---
99

1010
# Quickstart: Publish Bicep modules to private module registry
1111

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).
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).
1313

1414
## Prerequisites
1515

0 commit comments

Comments
 (0)