-
Notifications
You must be signed in to change notification settings - Fork 190
Expand file tree
/
Copy pathdeploy_container_registry.bicep
More file actions
33 lines (25 loc) · 1000 Bytes
/
deploy_container_registry.bicep
File metadata and controls
33 lines (25 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
targetScope = 'resourceGroup'
param environmentName string
var uniqueId = toLower(uniqueString(subscription().id, environmentName, resourceGroup().location))
var solutionName = 'cps-${padLeft(take(uniqueId, 12), 12, '0')}'
var containerNameCleaned = replace('cr${solutionName }', '-', '')
@description('Provide a location for the registry.')
param location string = resourceGroup().location
@description('Provide a tier of your Azure Container Registry.')
param acrSku string = 'Basic'
resource containerRegistry 'Microsoft.ContainerRegistry/registries@2021-09-01' = {
name: containerNameCleaned
location: location
sku: {
name: acrSku
}
properties: {
publicNetworkAccess: 'Enabled'
zoneRedundancy: 'Disabled'
}
}
output createdAcrName string = containerNameCleaned
output createdAcrId string = containerRegistry.id
output acrEndpoint string = containerRegistry.properties.loginServer