This repository has been archived on 2022-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
DevOpsOpenHack/iac/bicep/containerRegistry.bicep
2022-11-03 16:41:13 -04:00

21 lines
733 B
Bicep

param resourcesPrefix string
var location = resourceGroup().location
// https://docs.microsoft.com/en-us/azure/templates/microsoft.containerregistry/registries?tabs=bicep
resource containerRegistry 'Microsoft.ContainerRegistry/registries@2021-09-01' = {
name: '${resourcesPrefix}cr'
location: location
sku: {
name: 'Standard'
}
properties: {
adminUserEnabled: true
}
}
output containerRegistryLoginServer string = containerRegistry.properties.loginServer
output containerRegistryAdminUsername string = containerRegistry.listCredentials().username
output containerRegistryAdminPassword string = containerRegistry.listCredentials().passwords[0].value
output containerRegistryName string = containerRegistry.name