Hi everyone,
Just another Bicep template I’m using – this one is for a basic container registry:
param namePrefix string
param location string = resourceGroup().location
param tier string = 'Basic'
var registryName = '${namePrefix}${uniqueString(resourceGroup().id)}'
resource container_registry 'Microsoft.ContainerRegistry/registries@2020-11-01-preview' = {
name: registryName
location: location
sku: {
name: tier
}
properties: {
adminUserEnabled: false
policies: {
quarantinePolicy: {
status: 'disabled'
}
trustPolicy: {
type: 'Notary'
status: 'disabled'
}
retentionPolicy: {
days: 7
status: 'disabled'
}
}
encryption: {
status: 'disabled'
}
dataEndpointEnabled: false
publicNetworkAccess: 'Enabled'
networkRuleBypassOptions: 'AzureServices'
zoneRedundancy: 'Disabled'
anonymousPullEnabled: false
}
}
output id string = container_registry.id
See the following definition if you need more info on some of the properties: https://docs.microsoft.com/en-us/azure/templates/microsoft.containerregistry/2019-12-01-preview/registries?tabs=json
Leave a Reply