Azure Messaging Subscription
This page shows how to write Terraform for Messaging Subscription and write them securely.
azurerm_servicebus_subscription (Terraform)
The Subscription in Messaging can be configured in Terraform with the resource name azurerm_servicebus_subscription
. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
main.tf#L46
resource "azurerm_servicebus_subscription" "testsbsubscription1" {
name = var.sbsubscription1
resource_group_name = azurerm_resource_group.rgtestsb.name
namespace_name = azurerm_servicebus_namespace.testsbname.name
topic_name = azurerm_servicebus_topic.testrbtopic1.name
max_delivery_count = var.max_delivery_count1
main.tf#L42
resource "azurerm_servicebus_subscription" "static-data-notification" {
name = "static-data-notification"
resource_group_name = "cqrs-resourcegroup"
namespace_name = "cqrs-servicebus-namespace"
topic_name = "static-data-update-started"
max_delivery_count = 1
Parameters
-
auto_delete_on_idle
optional computed - string -
dead_lettering_on_filter_evaluation_error
optional - bool -
dead_lettering_on_message_expiration
optional - bool -
default_message_ttl
optional computed - string -
enable_batched_operations
optional - bool -
forward_dead_lettered_messages_to
optional - string -
forward_to
optional - string -
id
optional computed - string -
lock_duration
optional computed - string -
max_delivery_count
required - number -
name
required - string -
namespace_name
required - string -
requires_session
optional - bool -
resource_group_name
required - string -
status
optional - string -
topic_name
required - string -
timeouts
single block
Explanation in Terraform Registry
Manages a ServiceBus Subscription.
Azure Resource Manager Example
Azure Resource Manager code does not have the related resource.
Frequently asked questions
What is Azure Messaging Subscription?
Azure Messaging Subscription 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 Subscription?
For Terraform, the iac-coder/modularteracodestructure and amarfut/azure_scripts source code examples are useful. See the Terraform Example section for further details.