Course contentsShow
← Cloud and Infrastructure
Lesson 929 of 2,98917. Azure ARM Templates and BicepFree lesson

Module Registries

Publishing and consuming modules from Azure Container Registry and public Bicep registries.

Module Registries

You'll learn how to publish Bicep modules to registries and consume them across your infrastructure projects.

What Are Module Registries?

Think of a module registry as a library catalog for infrastructure code. Just as a library organizes books so anyone can find and borrow them, a module registry stores your Bicep modules in a central location where teams can discover, version, and reuse them. Instead of copying module files between projects, you publish them once and reference them by name.

Two Types of Registries

Azure Container Registry (ACR) is Microsoft's private registry service. You push Bicep modules to your organization's ACR, controlling access with Azure permissions. This keeps proprietary infrastructure patterns secure within your organization.

Public Bicep Registries host community-maintained modules that anyone can use. Microsoft maintains an official public registry with verified, production-ready modules for common Azure patterns.

Publishing and Consuming

When you publish a module, you use the Bicep CLI to push your .bicep file to a registry with a version tag (like v1.0.0). The registry stores it as an artifact.

When you consume a module, you reference it in your Bicep file using a special syntax that points to the registry, module path, and version. Bicep automatically downloads and caches it during deployment—no manual copying needed.

This approach ensures everyone uses the same tested, versioned modules, reducing duplication and inconsistencies across environments.

Key Takeaway:
Module registries centralize Bicep modules for sharing and versioning—publish to Azure Container Registry for private organizational use or consume from public registries for community-maintained patterns.