Skip to content

Instantly share code, notes, and snippets.

@iqan
Created July 8, 2023 10:45
Show Gist options
  • Save iqan/456ba4e2642deaf64f748730f2dadeff to your computer and use it in GitHub Desktop.
Save iqan/456ba4e2642deaf64f748730f2dadeff to your computer and use it in GitHub Desktop.
servicebus-trigger-demo-subscriptionRoleAssignment
var azureServiceBusDataOwnerRoleId = '090c5cfd-751d-490a-894a-3ce6f1109419'
resource subscriptionRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid('${servicebus.name}${servicebusSubscription.name}', userIdentity.name, azureServiceBusDataOwnerRoleId)
scope: servicebusSubscription
properties: {
principalId: userIdentity.properties.principalId
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', azureServiceBusDataOwnerRoleId)
principalType: 'ServicePrincipal'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment