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/managedIdentity.bicep

13 lines
526 B
Bicep
Raw Normal View History

2022-11-03 20:41:13 +00:00
param resourcesPrefix string
var location = resourceGroup().location
// https://docs.microsoft.com/en-us/azure/templates/microsoft.managedidentity/userassignedidentities?tabs=bicep
resource userAssignedManagedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
name: '${resourcesPrefix}uami'
location: location
}
output userAssignedManagedIdentityId string = userAssignedManagedIdentity.id
output userAssignedManagedIdentityPrincipalId string = userAssignedManagedIdentity.properties.principalId