Skip to content

Commit 4bf89ad

Browse files
committed
Added ACR template
1 parent 3503fcc commit 4bf89ad

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

ContainerRegistry/acr.bicep

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//
2+
// Deploys an Azure Container Registry
3+
// https://learn.microsoft.com/en-us/azure/container-registry/
4+
//
5+
6+
@description('Descriptor for this resource')
7+
param prefix string = 'acr'
8+
9+
@description('Unique suffix for all resources in this deployment')
10+
param suffix string = uniqueString(resourceGroup().id)
11+
12+
@description('Location for all resources.')
13+
param location string = resourceGroup().location
14+
15+
@description('SKU name.')
16+
param sku string = 'Basic'
17+
18+
resource acr 'Microsoft.ContainerRegistry/registries@2022-12-01' = {
19+
name: '${prefix}000${suffix}'
20+
location: location
21+
sku: {
22+
name: sku
23+
}
24+
properties: {
25+
adminUserEnabled: true
26+
}
27+
}
28+
29+
output result object = {
30+
name: acr.name
31+
id: acr.id
32+
server: acr.properties.loginServer
33+
username: acr.listCredentials().username
34+
password: acr.listCredentials().passwords[0].value
35+
}

0 commit comments

Comments
 (0)