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
main.tf#L2
resource "azurerm_servicebus_namespace" "azbus" {
name = var.name
location = var.location
resource_group_name = var.resource_group_name
sku = var.sku
}
servicebus.tf#L1
resource "azurerm_servicebus_namespace" "asb-namespace" {
name = var.sb_namespace_name
location = var.location
resource_group_name = var.resourcegroup_name
sku = "Standard"
}
main.tf#L20
resource "azurerm_servicebus_namespace" "queue" {
name = module.naming.servicebus_namespace.name_unique
location = local.loc
resource_group_name = azurerm_resource_group.queue.name
sku = "Standard"
}
servicebus.tf#L1
resource "azurerm_servicebus_namespace" "sb_namespace" {
name = var.sb_namespace_name
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
sku = "Standard"
main.tf#L2
resource "azurerm_servicebus_namespace" "main" {
for_each = var.servicebus
name = each.value.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
main.tf#L5
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
service_bus.tf#L1
resource "azurerm_servicebus_namespace" "sb" {
name = var.servicebus_namespace_name
location = azurerm_resource_group.IoT-Platform.location
resource_group_name = azurerm_resource_group.IoT-Platform.name
sku = var.servicebus_sku
tags = {
Parameters
-
capacity
optional - number -
default_primary_connection_string
optional computed - string -
default_primary_key
optional computed - string -
default_secondary_connection_string
optional computed - string -
default_secondary_key
optional computed - string -
id
optional computed - string -
location
required - string -
name
required - string -
resource_group_name
required - string -
sku
required - string -
tags
optional - map from string to string -
zone_redundant
optional - bool -
timeouts
single block
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.