Analytics & IoT
Event Hubs consumer group
Gives a set of consumers an independent view of an event hub stream.
Naming rules
- Abbreviation
- Length
- 1-50
- Allowed characters
- Alphanumerics, periods, hyphens, and underscores. Start and end with letter or number.
- Uniqueness scope
- event hub
Azure Verified Modules naming utility v0.3.0 · AVM naming key namespace_eventhub_consumergroup
Code examples
Adapt the examples to your environment and supply referenced resources and variables.
Terraform
Terraform documentationhcl
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
version = "~> 2.0"
}
}
}
variable "name" {
type = string
}
variable "parent_id" {
description = "Full Azure resource ID of the parent resource or resource group."
type = string
}
resource "azapi_resource" "example" {
type = "Microsoft.EventHub/namespaces/eventhubs/consumergroups@2026-01-01"
name = var.name
parent_id = var.parent_id
body = {
properties = {}
}
}
Bicep
Bicep documentationbicep
param name string
@description('Slash-separated names of the parent resources in this resource group.')
param parentName string
resource example 'Microsoft.EventHub/namespaces/eventhubs/consumergroups@2026-01-01' = {
name: '${parentName}/${name}'
properties: {}
}
ARM template
ARM template documentationjson
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "string"
},
"parentName": {
"type": "string",
"metadata": {
"description": "Slash-separated names of the parent resources in this resource group."
}
}
},
"resources": [
{
"type": "Microsoft.EventHub/namespaces/eventhubs/consumergroups",
"apiVersion": "2026-01-01",
"name": "[format('{0}/{1}', parameters('parentName'), parameters('name'))]",
"properties": {}
}
]
}
Private endpoints
Configure the private endpoint on the related resource Microsoft.EventHub/namespaces.
Choose the group ID for the connection you need. Available groups and DNS records depend on the cloud, region, SKU, and enabled features.
Azure public cloud
- Target subresources (group IDs)
- Private DNS zones
- Public DNS zones to forward
Azure Government
- Target subresources (group IDs)
- Private DNS zones
- Public DNS zones to forward
Azure operated by 21Vianet (China)
- Target subresources (group IDs)
- Private DNS zones
- Public DNS zones to forward