Container Registry Landing Zone

br/innofactor:avm/ptn/lz/container-registry:0.3.0

README

Azure Container Registry [Lz/ContainerRegistry]

This Instance deploys an Azure Container Registry.

Resource Types

Resource TypeAPI Version
Microsoft.Authorization/locks2020-05-01
Microsoft.Authorization/roleAssignments2022-04-01
Microsoft.ContainerRegistry/registries2023-06-01-preview
Microsoft.ContainerRegistry/registries/cacheRules2023-06-01-preview
Microsoft.ContainerRegistry/registries/credentialSets2023-11-01-preview
Microsoft.ContainerRegistry/registries/replications2023-06-01-preview
Microsoft.ContainerRegistry/registries/scopeMaps2023-06-01-preview
Microsoft.ContainerRegistry/registries/webhooks2023-06-01-preview
Microsoft.Insights/diagnosticSettings2021-05-01-preview
Microsoft.Network/privateEndpoints2023-11-01
Microsoft.Network/privateEndpoints/privateDnsZoneGroups2023-11-01
Microsoft.Resources/resourceGroups2021-04-01

Usage examples

The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.

Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.

Note: To reference the module, please use the following syntax br/innofactor:avm/ptn/lz/container-registry:<version>.

Example 1: Azure Container Registry (Landing Zone Submodule Minimal)

This module deploys an Azure Continer Registry using minimal parameters.

via Bicep module
module containerRegistry 'br/innofactor:avm/ptn/lz/container-registry:<version>' = {
  name: 'containerRegistryDeployment'
  params: {
    // Required parameters
    name: 'acrlzmin001'
    // Non-required parameters
    location: '<location>'
  }
}

via JSON parameters file
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    // Required parameters
    "name": {
      "value": "acrlzmin001"
    },
    // Non-required parameters
    "location": {
      "value": "<location>"
    }
  }
}

via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/container-registry:<version>'

// Required parameters
param name = 'acrlzmin001'
// Non-required parameters
param location = '<location>'

Example 2: Azure Container Registry (Landing Zone Submodule WAF)

This module deploys an Azure Continer Registry using Well Architected Framework parameters.

via Bicep module
module containerRegistry 'br/innofactor:avm/ptn/lz/container-registry:<version>' = {
  name: 'containerRegistryDeployment'
  params: {
    // Required parameters
    name: 'acrlzwaf001'
    // Non-required parameters
    acrSku: 'Premium'
    location: '<location>'
    publicNetworkAccess: 'Disabled'
    replications: [
      {
        location: '<location>'
        name: '<name>'
      }
    ]
  }
}

via JSON parameters file
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    // Required parameters
    "name": {
      "value": "acrlzwaf001"
    },
    // Non-required parameters
    "acrSku": {
      "value": "Premium"
    },
    "location": {
      "value": "<location>"
    },
    "publicNetworkAccess": {
      "value": "Disabled"
    },
    "replications": {
      "value": [
        {
          "location": "<location>",
          "name": "<name>"
        }
      ]
    }
  }
}

via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/container-registry:<version>'

// Required parameters
param name = 'acrlzwaf001'
// Non-required parameters
param acrSku = 'Premium'
param location = '<location>'
param publicNetworkAccess = 'Disabled'
param replications = [
  {
    location: '<location>'
    name: '<name>'
  }
]

Parameters

Required parameters

ParameterTypeDescription
namestringName of the resource to create.

Optional parameters

ParameterTypeDescription
acrSkustringThe SKU of the container registry. Geo-replication requires Premium.
adminUserEnabledboolEnable/Disable Admin User.
anonymousPullEnabledboolEnable/Disable Anonymous Pull, defaults of false.
enableTelemetryboolEnable/Disable usage telemetry for module.
environmentstringThe environment to deploy the resources to.
locationstringLocation for all Resources.
publicNetworkAccessstringWhether public network access is allowed. Disabling it requires the Premium SKU.
replicationsarrayGeo-replications of the container registry. Requires acrSku to be Premium. Each entry needs a name and a location that differs from the registry location.
tagsobjectTags to be added to the resources.
Parameter: name

Name of the resource to create.

  • Required: Yes
  • Type: string
Parameter: acrSku

The SKU of the container registry. Geo-replication requires Premium.

  • Required: No
  • Type: string
  • Default: 'Standard'
  • Allowed:
    [
      'Basic'
      'Premium'
      'Standard'
    ]
Parameter: adminUserEnabled

Enable/Disable Admin User.

  • Required: No
  • Type: bool
  • Default: False
Parameter: anonymousPullEnabled

Enable/Disable Anonymous Pull, defaults of false.

  • Required: No
  • Type: bool
  • Default: False
Parameter: enableTelemetry

Enable/Disable usage telemetry for module.

  • Required: No
  • Type: bool
  • Default: True
Parameter: environment

The environment to deploy the resources to.

  • Required: No
  • Type: string
  • Default: 'Prod'
Parameter: location

Location for all Resources.

  • Required: No
  • Type: string
  • Default: [deployment().location]
Parameter: publicNetworkAccess

Whether public network access is allowed. Disabling it requires the Premium SKU.

  • Required: No
  • Type: string
  • Default: 'Enabled'
  • Allowed:
    [
      'Disabled'
      'Enabled'
    ]
Parameter: replications

Geo-replications of the container registry. Requires acrSku to be Premium. Each entry needs a name and a location that differs from the registry location.

  • Required: No
  • Type: array
Parameter: tags

Tags to be added to the resources.

  • Required: No
  • Type: object
  • Default:
    {
        Contact: 'damian.flynn@innofactor.com'
        Environment: 'Prod'
        'hidden-title': 'Innofactor Bicep Container Registry'
        Owner: 'Azure Practice'
        Repository: 'innofactororg/azure-solutions'
        Role: 'Registry'
    }

Outputs

None

Cross-referenced modules

This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).

ReferenceType
br/public:avm/res/container-registry/registry:0.8.1Remote reference

Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.

Changelog

Changelog

0.3.0

Changes
  • Added the acrSku parameter (default Standard, as before). Geo-replication and disabling public access require Premium.
  • Added the replications parameter for geo-replication (default: none) and the publicNetworkAccess parameter (default Enabled, as before).
  • The waf-aligned test deploys a Premium registry with a geo-replica and public access disabled, which satisfies the PSRule WAF Reliability rules.
  • Regenerated main.json and README.md with Bicep 0.49.2 so that they match main.bicep (#206).
  • Released by the hardened pipeline: published only when main.json changes, release tag created after a successful publish, GitHub Release per tag (ADR 0004, ADR 0003, ADR 0005).
Breaking Changes
  • None. The new parameters default to the previous behaviour.

0.2.7

Changes
  • Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
  • None

0.2.6

Changes
  • Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
  • None

0.2.5

Changes
  • Default (#61)
Breaking Changes
  • None

0.2.4

Changes
  • Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
  • None

0.2.3

Changes
  • Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
  • None

0.2.2

Changes
  • Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
  • None

0.2.1

Changes
  • 55 test placement replacement (#58)
Breaking Changes
  • None

0.2.0

Changes
  • Update version.json
Breaking Changes
  • None

Version history

VersionPublished
0.3.02026-11-16
0.2.72025-02-01
0.2.62025-01-31
0.2.52025-01-30
0.2.42025-01-29
0.2.22025-01-29
0.2.12025-01-29
0.2.02025-01-29