Azure Messaging Authorization Rule
This page shows how to write Terraform and Azure Resource Manager for Messaging Authorization Rule and write them securely.
azurerm_eventhub_authorization_rule (Terraform)
The Authorization Rule in Messaging can be configured in Terraform with the resource name azurerm_eventhub_authorization_rule. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_eventhub_authorization_rule" "receive" {
name = "Listen"
namespace_name = var.eventhub_namespace_name
eventhub_name = azurerm_eventhub.main.name
resource_group_name = var.resource_group_name
listen = true
resource "azurerm_eventhub_authorization_rule" "eh-rule-writer" {
name = "writer"
namespace_name = azurerm_eventhub_namespace.evh-ns.name
eventhub_name = azurerm_eventhub.eh.name
resource_group_name = azurerm_resource_group.data-integration-rg.name
listen = false
resource "azurerm_eventhub_authorization_rule" "demo_eh_sender" {
for_each = var.event_hubs
name = join("-", [each.value.name, "sender"])
namespace_name = azurerm_eventhub_namespace.demo_ns.name
eventhub_name = each.value.name
resource_group_name = var.resource_group_name
resource "azurerm_eventhub_authorization_rule" "notifications_notifier_send" {
name = "send"
namespace_name = azurerm_eventhub_namespace.ehns.name
eventhub_name = azurerm_eventhub.notifications.name
resource_group_name = azurerm_resource_group.rg.name
listen = false
resource "azurerm_eventhub_authorization_rule" "evhub_rule" {
name = var.settings.rule_name
namespace_name = var.namespace_name
eventhub_name = var.eventhub_name
resource_group_name = var.resource_group_name
listen = var.settings.listen
resource "azurerm_eventhub_authorization_rule" "evhar" {
resource_group_name = azurerm_resource_group.rg.name
namespace_name = azurerm_eventhub_namespace.evhns.name
eventhub_name = azurerm_eventhub.evh.name
name = var.name-evhar
send = var.send-evhar
resource "azurerm_eventhub_authorization_rule" "evhubiotauthorize" {
resource_group_name = azurerm_resource_group.rg.name
namespace_name = azurerm_eventhub_namespace.evhubiotnmspace.name
eventhub_name = azurerm_eventhub.evhubiot.name
name = "acctest"
send = true
resource "azurerm_eventhub_authorization_rule" "evhar" {
resource_group_name = azurerm_resource_group.rg.name
namespace_name = azurerm_eventhub_namespace.evhns.name
eventhub_name = azurerm_eventhub.evh.name
name = var.name-evhar
send = var.send-evhar
resource "azurerm_eventhub_authorization_rule" "evhar" {
resource_group_name = azurerm_resource_group.rg.name
namespace_name = azurerm_eventhub_namespace.evhns.name
eventhub_name = azurerm_eventhub.evh.name
name = var.name-evhar
send = var.send-evhar
resource "azurerm_eventhub_authorization_rule" "evhubiotauthorize" {
resource_group_name = azurerm_resource_group.rg.name
namespace_name = azurerm_eventhub_namespace.evhubiotnmspace.name
eventhub_name = azurerm_eventhub.evhubiot.name
name = "acctest"
send = true
Parameters
-
eventhub_namerequired - string -
idoptional computed - string -
listenoptional - bool -
manageoptional - bool -
namerequired - string -
namespace_namerequired - string -
primary_connection_stringoptional computed - string -
primary_connection_string_aliasoptional computed - string -
primary_keyoptional computed - string -
resource_group_namerequired - string -
secondary_connection_stringoptional computed - string -
secondary_connection_string_aliasoptional computed - string -
secondary_keyoptional computed - string -
sendoptional - bool -
timeoutssingle block
Explanation in Terraform Registry
Manages a Event Hubs authorization Rule within an Event Hub.
Microsoft.EventHub/namespaces/eventhubs/authorizationRules (Azure Resource Manager)
The namespaces/eventhubs/authorizationRules in Microsoft.EventHub can be configured in Azure Resource Manager with the resource name Microsoft.EventHub/namespaces/eventhubs/authorizationRules. 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
apiVersionrequired - stringnamerequired - stringThe authorization rule name.
propertiesrequiredrightsrequired - arrayThe rights associated with the rule.
typerequired - string
Frequently asked questions
What is Azure Messaging Authorization Rule?
Azure Messaging Authorization Rule is a resource for Messaging of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Messaging Authorization Rule?
For Terraform, the eclipse/tractusx, ylasmak/Azure-Function-Event-Hub-Terraform and dmaxim/terrademo source code examples are useful. See the Terraform Example section for further details.