Advertisement
Guest User

identity.bicep

a guest
Apr 20th, 2023
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. @secure()
  2. param provisionParameters object
  3. var resourceBaseName = provisionParameters.resourceBaseName
  4. var identityName = contains(provisionParameters, 'userAssignedIdentityName') ? provisionParameters['userAssignedIdentityName'] : '${resourceBaseName}' // Try to read name for user assigned identity from parameters
  5.  
  6. // user assigned identity will be used to access other Azure resources
  7. resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
  8. name: identityName
  9. location: resourceGroup().location
  10. }
  11.  
  12. output identityName string = identityName
  13. output identityClientId string = managedIdentity.properties.clientId
  14. output identityResourceId string = managedIdentity.id
  15. output identityPrincipalId string = managedIdentity.properties.principalId
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement