Azure Messaging Namespace Authorization Rule

This page shows how to write Terraform and Azure Resource Manager for Messaging Namespace Authorization Rule and write them securely.

azurerm_servicebus_namespace_authorization_rule (Terraform)

The Namespace Authorization Rule in Messaging can be configured in Terraform with the resource name azurerm_servicebus_namespace_authorization_rule. The following sections describe 7 examples of how to use the resource and its parameters.

Example Usage from GitHub

topics.tf#L9
resource "azurerm_servicebus_namespace_authorization_rule" "properties" {
  name                = "property-auth-rule"
  namespace_name      = var.servicebus_name
  resource_group_name = var.servicebus_rg

  listen = true
service_bus.tf#L11
resource "azurerm_servicebus_namespace_authorization_rule" "amqp10-converter" {
  name                = var.servicebus_auth_rule_name_amqp10-converter
  resource_group_name = azurerm_servicebus_namespace.sb.resource_group_name
  namespace_name      = azurerm_servicebus_namespace.sb.name

  listen = true
azurerm_servicebus_namespace_authorization_rule.tf#L1
resource "azurerm_servicebus_namespace_authorization_rule" "this" {
  # listen - (optional) is a type of bool
  listen = var.listen
  # manage - (optional) is a type of bool
  manage = var.manage
  # name - (required) is a type of string
main.tf#L7
resource "azurerm_servicebus_namespace_authorization_rule" "this" {
  listen              = var.listen
  manage              = var.manage
  name                = var.name
  namespace_name      = var.namespace_name
  resource_group_name = var.resource_group_name
main.tf#L15
resource "azurerm_servicebus_namespace_authorization_rule" "send_listen_auth_rule" {
  name                = local.auth_rule_name
  namespace_name      = azurerm_servicebus_namespace.servicebus_namespace.name
  resource_group_name = var.resource_group_name

  listen = true
main.tf#L18
resource "azurerm_servicebus_namespace_authorization_rule" "sbauth" {
  name                = format("%s-DefaultAuth",azurerm_servicebus_namespace.sb.name)
  namespace_name      = azurerm_servicebus_namespace.sb.name
  resource_group_name = azurerm_resource_group.rg.name
  listen = var.azure_servicebus_auth_listen
  send   = var.azure_servicebus_auth_send
main.tf#L7
resource "azurerm_servicebus_namespace_authorization_rule" "this" {
  listen              = var.listen
  manage              = var.manage
  name                = var.name
  namespace_name      = var.namespace_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 ServiceBus Namespace authorization Rule within a ServiceBus.

Microsoft.ServiceBus/namespaces/AuthorizationRules (Azure Resource Manager)

The namespaces/AuthorizationRules in Microsoft.ServiceBus can be configured in Azure Resource Manager with the resource name Microsoft.ServiceBus/namespaces/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

  • apiVersion required - string
  • name required - string

    The authorization rule name.

  • properties required
      • rights required - array

        The rights associated with the rule.

  • type required - string

Frequently asked questions

What is Azure Messaging Namespace Authorization Rule?

Azure Messaging Namespace 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 Namespace Authorization Rule?

For Terraform, the DoesDotNet/propt-properties, c-3lab/data-accumulation-platform-using-fiware and huw564/k8s source code examples are useful. See the Terraform Example section for further details.