Skip to content

Azure Service Bus Module

Requirements

Name Version
terraform >= 1.0
azurerm >= 4.0.0

Providers

Name Version
azurerm >= 4.0.0

Resources

Name Type
azurerm_servicebus_namespace.this resource
azurerm_servicebus_namespace_authorization_rule.this resource
azurerm_servicebus_queue.this resource
azurerm_servicebus_queue_authorization_rule.this resource
azurerm_servicebus_topic.this resource
azurerm_servicebus_topic_authorization_rule.this resource
azurerm_client_config.currentAzureRM data source

Inputs

Name Description Type Default Required
capacity Optional. Number of Messaging Units. Basic and Standard Sku must be 0. Premium sku can be 1, 2, 4, 8, or 16 number 1 no
default_action Optional. Firewall allow all IP addresses string "Allow" no
ip_rules Optional. Firewall Ip addresses list(string) null no
namespace Required. Name of the service bus. This will be validated by Azure as it must be globally unique and follow their naming constraints (6-50 characters, only alphanumeric and hyphens, etc.). string n/a yes
namespace_access_rules Optional. Collection of access rule objects, with the collection key as the name of the rule (and is used as the user in the resulting connection string). An Api key will be created for each rule to authenticate to the service bus.
map(object({
manage = optional(bool, false)
listen = optional(bool, false)
send = optional(bool, false)
}))
{} no
premium_messaging_partitions Optional. Premium messaging partitions. number 1 no
public_network_access_enabled Optional. Public network access enabled? bool false no
queues Optional. Collection of queue objects, with the name of the queue as the key and the value containing any properties to modify from the default.
map(object({
dead_lettering_on_message_expiration = optional(bool, false)
enable_partitioning = optional(bool, false)
forward_to = optional(string, null)
max_delivery_count = optional(number, 10)
max_size_in_megabytes = optional(number, 1024)
requires_duplicate_detection = optional(bool, false)
requires_session = optional(bool, false)
access_rules = optional(map(object({
manage = optional(bool, false)
listen = optional(bool, false)
send = optional(bool, false)
})), {})
}))
{} no
rg Required. Resource Group object
object({
location = string
name = string
})
n/a yes
sku Optional. Service Tier Sku. Must be one of Basic, Standard (default), or Premium. string "Standard" no
tags Optional. Map of tags; will be merged with tags generated by this module. See locals.tf map(string) {} no
topics Optional. Collection of topic objects, with the name of the topic as the key and the value containing any properties to modify from the default.
map(object({
enable_partitioning = optional(bool, false)
support_ordering = optional(bool, true)
access_rules = optional(map(object({
manage = optional(bool, false)
listen = optional(bool, false)
send = optional(bool, false)
})), {})
}))
{} no
trusted_services_allowed Optional. Azure trusted services allowed? bool true no

Outputs

Name Description
namespace n/a
namespace_connection_strings n/a
queue_authorization_rules n/a
queue_connection_strings n/a
queues n/a
topic_authorization_rules n/a
topic_connection_strings n/a
topics n/a