@description('Specifies a project name that is used to generate the Event Hub name and the Namespace name.')paramprojectNamestring
@description('Specifies the Azure location for all resources.')paramlocationstring = resourceGroup().location
@description('Specifies the messaging tier for Event Hub Namespace.')
@allowed([
'Basic''Standard'
])parameventHubSkustring = 'Standard'vareventHubNamespaceName = '${projectName}ns'vareventHubName = projectNameresourceeventHubNamespace'Microsoft.EventHub/namespaces@2021-11-01' = {
name: eventHubNamespaceNamelocation: locationsku: {
name: eventHubSkutier: eventHubSkucapacity: 1
}
properties: {
isAutoInflateEnabled: falsemaximumThroughputUnits: 0
}
}
resourceeventHub'Microsoft.EventHub/namespaces/eventhubs@2021-11-01' = {
parent: eventHubNamespacename: eventHubNameproperties: {
messageRetentionInDays: 7partitionCount: 1
}
}
az group create --name exampleRG --location eastus
az deployment group create --resource-group exampleRG --template-file main.bicep --parametersprojectName=<project-name>