Azure IoT Hub Consumer Group

This page shows how to write Terraform and Azure Resource Manager for IoT Hub Consumer Group and write them securely.

azurerm_iothub_consumer_group (Terraform)

The Consumer Group in IoT Hub can be configured in Terraform with the resource name azurerm_iothub_consumer_group. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L7
resource "azurerm_iothub_consumer_group" "this" {
  eventhub_endpoint_name = var.eventhub_endpoint_name
  iothub_name            = var.iothub_name
  name                   = var.name
  resource_group_name    = var.resource_group_name

main.tf#L7
resource "azurerm_iothub_consumer_group" "this" {
  eventhub_endpoint_name = var.eventhub_endpoint_name
  iothub_name            = var.iothub_name
  name                   = var.name
  resource_group_name    = var.resource_group_name

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Consumer Group within an IotHub

Microsoft.Devices/IotHubs/eventHubEndpoints/ConsumerGroups (Azure Resource Manager)

The IotHubs/eventHubEndpoints/ConsumerGroups in Microsoft.Devices can be configured in Azure Resource Manager with the resource name Microsoft.Devices/IotHubs/eventHubEndpoints/ConsumerGroups. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

  • apiVersion required - string
  • name required - string

    The name of the consumer group to add.

  • properties required
      • name required - string

        EventHub consumer group name

  • type required - string

Frequently asked questions

What is Azure IoT Hub Consumer Group?

Azure IoT Hub Consumer Group is a resource for IoT Hub of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure IoT Hub Consumer Group?

For Terraform, the kevinhead/azurerm and niveklabs/azurerm source code examples are useful. See the Terraform Example section for further details.