Event Hub should have multiple partitions for availability
Medium
Azure
General
eventhubs-event-hub-multiple-partitions
Applies to
Microsoft.EventHub/namespaces/eventhubs
What CGPulse checks
A resource passes this rule when partitionCount must be one of [2,4,8,16,32]. Anything else is reported as a finding with the evaluated property value attached as evidence.
How to fix it
Configure multiple partitions for better throughput and availability. In Azure Portal: Event Hub > Properties > verify partition count (set at creation). See: https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-scalability#partitions
CLI
az eventhubs eventhub show --ids "{id}" --query partitionCountBicep
resource eventHub 'Microsoft.EventHub/namespaces/eventhubs@2024-01-01' = {
name: '{name}'
parent: eventHubNamespace
properties: {
partitionCount: 4
messageRetentionInDays: 7
}
}
Terraform
resource "azurerm_eventhub" "{name}" {
name = "{name}"
namespace_name = "{parent}"
resource_group_name = "{rg}"
partition_count = 4
message_retention = 7
}
Compliance frameworks
Is your environment compliant with this rule?
CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.
Related Azure rules
- Action Group should be enabled
- Activity Log Alert should be enabled
- AKS cluster logs should be sent to Log Analytics
- AKS cluster must enable RBAC
- AKS cluster must enable RBAC
- AKS cluster should be a private cluster
- AKS cluster should disable local accounts
- AKS cluster should enable Azure RBAC for Kubernetes