bicep example to create service bus
Sample bicep file to create Service bus
Because i am provisioning Basic service bus tier, there's a couple of properties that needs to be commented out.
@description('Location for all resources.')
param location string = resourceGroup().location
@description('')
resource serviceBusNamespace 'Microsoft.ServiceBus/namespaces@2021-06-01-preview' = {
name: 'mytestservicebusjerwo'
location: location
sku: {
name: 'Basic'
capacity: 1
tier: 'Basic'
}
}
resource serviceBusQueue 'Microsoft.ServiceBus/namespaces/queues@2022-01-01-preview' = {
parent: serviceBusNamespace
name: 'myqueue'
properties: {
lockDuration: 'PT5M'
maxSizeInMegabytes: 1024
requiresDuplicateDetection: false
requiresSession: false
//defaultMessageTimeToLive: 'P10675199DT2H48M5.4775807S'
deadLetteringOnMessageExpiration: false
duplicateDetectionHistoryTimeWindow: 'PT10M'
maxDeliveryCount: 10
//autoDeleteOnIdle: 'P10675199DT2H48M5.4775807S'
enablePartitioning: false
enableExpress: false
}
}
To deploy
To deploy
az group create --name exampleRG --location eastus
az deployment group create --resource-group jerwoo --template-file servicebus.
Comments