Azure Messaging Namespace

This page shows how to write Terraform for Messaging Namespace and write them securely.

azurerm_servicebus_namespace (Terraform)

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

Example Usage from GitHub
resource "azurerm_servicebus_namespace" "azbus" {
  name                =
  location            = var.location
  resource_group_name = var.resource_group_name
  sku                 = var.sku
resource "azurerm_servicebus_namespace" "asb-namespace" {
  name                = var.sb_namespace_name
  location            = var.location
  resource_group_name = var.resourcegroup_name
  sku                 = "Standard"
resource "azurerm_servicebus_namespace" "queue" {
  name                = module.naming.servicebus_namespace.name_unique
  location            = local.loc
  resource_group_name =
  sku                 = "Standard"
resource "azurerm_servicebus_namespace" "sb_namespace" {
  name                = var.sb_namespace_name
  location            = azurerm_resource_group.rg.location
  resource_group_name =
  sku                 = "Standard"
resource "azurerm_servicebus_namespace" "main" {
  for_each            = var.servicebus
  name                =
  location            = var.resource_group_output[each.value.resource_group_name].location
  resource_group_name = var.resource_group_output[each.value.resource_group_name].name
  sku                 = each.value.sku
resource "azurerm_servicebus_namespace" "example" {
  name                = var.namespace_name
  location            = var.location
  resource_group_name = var.resource_group_name
  tags                = var.tags
  sku                 = var.sku_name
resource "azurerm_servicebus_namespace" "sb" {
  name                = var.servicebus_namespace_name
  location            = azurerm_resource_group.IoT-Platform.location
  resource_group_name =
  sku                 = var.servicebus_sku
  tags = {

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).


Explanation in Terraform Registry

Manages a ServiceBus Namespace.

Azure Resource Manager Example

Azure Resource Manager code does not have the related resource.

Frequently asked questions

What is Azure Messaging Namespace?

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

For Terraform, the atticalabs/terraform, harishve6/secondrepo and JVHallam/infrastructure source code examples are useful. See the Terraform Example section for further details.


Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.