Files
autogen/infra/core/security/registry-access.bicep
Kosta Petan f423e15b1a Orleans improvements (#6)
* namespace fixes + remove skills definitios from Actors project

* add waf context to actors

* deploy to Azure WIP

* add bicep for gh-flow and cosmos

* azure deploy fixes

* azure deploy WIP
2023-10-26 22:09:18 +02:00

20 lines
792 B
Bicep

metadata description = 'Assigns ACR Pull permissions to access an Azure Container Registry.'
param containerRegistryName string
param principalId string
var acrPullRole = subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7f951dda-4ed3-4680-a7ca-43fe172d538d')
resource aksAcrPull 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
scope: containerRegistry // Use when specifying a scope that is different than the deployment scope
name: guid(subscription().id, resourceGroup().id, principalId, acrPullRole)
properties: {
roleDefinitionId: acrPullRole
principalType: 'ServicePrincipal'
principalId: principalId
}
}
resource containerRegistry 'Microsoft.ContainerRegistry/registries@2022-02-01-preview' existing = {
name: containerRegistryName
}