» azurerm_servicebus_queue_authorization_rule

Manages an Authorization Rule for a ServiceBus Queue.

» Example Usage

resource "azurerm_resource_group" "example" {
  name     = "terraform-servicebus"
  location = "West US"
}

resource "azurerm_servicebus_namespace" "example" {
  name                = "tfex_sevicebus_namespace"
  location            = "${azurerm_resource_group.example.location}"
  resource_group_name = "${azurerm_resource_group.example.name}"
  sku                 = "Standard"

  tags = {
    source = "terraform"
  }
}

resource "azurerm_servicebus_queue" "example" {
  name                = "tfex_servicebus_queue"
  resource_group_name = "${azurerm_resource_group.example.name}"
  namespace_name      = "${azurerm_servicebus_namespace.example.name}"

  enable_partitioning = true
}

resource "azurerm_servicebus_queue_authorization_rule" "example" {
  name                = "examplerule"
  namespace_name      = "${azurerm_servicebus_namespace.example.name}"
  queue_name          = "${azurerm_servicebus_queue.example.name}"
  resource_group_name = "${azurerm_resource_group.example.name}"

  listen = true
  send   = true
  manage = false
}

» Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.

  • namespace_name - (Required) Specifies the name of the ServiceBus Namespace in which the Queue exists. Changing this forces a new resource to be created.

  • queue_name - (Required) Specifies the name of the ServiceBus Queue. Changing this forces a new resource to be created.

  • resource_group_name - (Required) The name of the Resource Group in which the ServiceBus Namespace exists. Changing this forces a new resource to be created.

  • listen - (Optional) Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to false.

  • send - (Optional) Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to false.

  • manage - (Optional) Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is true - both listen and send must be too. Defaults to false.

» Attributes Reference

The following attributes are exported:

» Import

ServiceBus Queue Authorization Rules can be imported using the resource id, e.g.

terraform import azurerm_servicebus_queue_authorization_rule.rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/namespace1/queues/queue1/authorizationRules/rule1