ACRDeployment - Node4-Digital/ris-CloudInfra-ALZ-MS-Bicep GitHub Wiki
Azure Landing Zones - Private/Organizational Azure Container Registry Deployment (also known as private registry for Bicep modules)
This document outlines the prerequisites, dependencies and flow to setup a Private/Organizational Azure Container Registry. Once deployed, you can then upload the modules contained within this repository, and deploy.
This is based on the official Bicep docs here: Create private registry for Bicep modules
Prerequisites
- Azure Active Directory Tenant.
- Minimum 1 subscription. Subscription(s) are required when configuring
Azure Container Registryservices. - Deployment Identity with
Contributorpermission to the subscription.
Deployment Flow
- Clone Bicep Azure Landing Zone Github repository
git clone https://github.com/Azure/ALZ-Bicep.git
- Login to Azure leveraging PowerShell or CLI
- PowerShell:
Connect-AzAccount - CLI:
az login
- PowerShell:
- Select Azure Subscription to deploy Container Registry to
- PowerShell:
Select-AzSubscription -SubscriptionId 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' - CLI:
az account set --subscription 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
- PowerShell:
- Create Resource Group
- Call Bicep template to create Azure Container Registry
- Loop through infra-az-code/bicep/modules folders and call
bicep publishfor each bicep module in this repo
Provided automation
Two scripts exist which automate steps 4 to 6.
Deployment
Prior to executing your desired script, steps one and two need to be complete, and the two variables should be reviewed in the script.
- Variables exist on lines 3 and 4 of each script and should be updated to match your desired resource group and region.
- Execute script with following commands:
- PowerShell:
./docs/scripts/createRGandcallBicep.ps1 - CLI:
./docs/scripts/createRGandcallBicep.sh
- PowerShell: