PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.7
Code Block Pro – Beautiful Syntax Highlighting v1.27.7
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / samples / bicep.sample

bicep.sample in Code Block Pro – Beautiful Syntax Highlighting 1.27.7, at build/shiki/samples/bicep.sample

47 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @description('Name of the eventhub namespace')
2 param eventHubNamespaceName string
3
4 @description('Name of the eventhub name')
5 param eventHubName string
6
7 @description('The service principal')
8 param principalId string
9
10 // Create an event hub namespace
11 resource eventHubNamespace 'Microsoft.EventHub/namespaces@2021-01-01-preview' = {
12 name: eventHubNamespaceName
13 location: resourceGroup().location
14 sku: {
15 name: 'Standard'
16 tier: 'Standard'
17 capacity: 1
18 }
19 properties: {
20 zoneRedundant: true
21 }
22 }
23
24 // Create an event hub inside the namespace
25 resource eventHub 'Microsoft.EventHub/namespaces/eventhubs@2021-01-01-preview' = {
26 parent: eventHubNamespace
27 name: eventHubName
28 properties: {
29 messageRetentionInDays: 7
30 partitionCount: 1
31 }
32 }
33
34 // give Azure Pipelines Service Principal permissions against the event hub
35
36 var roleDefinitionAzureEventHubsDataOwner = subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f526a384-b230-433a-b45c-95f59c4a2dec')
37
38 resource integrationTestEventHubReceiverNamespaceRoleAssignment 'Microsoft.Authorization/roleAssignments@2018-01-01-preview' = {
39 name: guid(principalId, eventHub.id, roleDefinitionAzureEventHubsDataOwner)
40 scope: eventHubNamespace
41 properties: {
42 roleDefinitionId: roleDefinitionAzureEventHubsDataOwner
43 principalId: principalId
44 }
45 }
46
47 // From https://dev.azure.com/johnnyreilly/blog-demos/_git/permissioning-azure-pipelines-bicep-role-assignments?path=/infra/main.bicep