azurerm_notification_hub_authorization_rule

Manages an Authorization Rule associated with a Notification Hub within a Notification Hub Namespace.

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "notificationhub-resources"
  location = "West Europe"
}

resource "azurerm_notification_hub_namespace" "example" {
  name                = "myappnamespace"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  namespace_type      = "NotificationHub"
  sku_name            = "Free"
}

resource "azurerm_notification_hub" "example" {
  name                = "mynotificationhub"
  namespace_name      = azurerm_notification_hub_namespace.example.name
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
}

resource "azurerm_notification_hub_authorization_rule" "example" {
  name                  = "management-auth-rule"
  notification_hub_name = azurerm_notification_hub.example.name
  namespace_name        = azurerm_notification_hub_namespace.example.name
  resource_group_name   = azurerm_resource_group.example.name
  manage                = true
  send                  = true
  listen                = true
}

Argument Reference

The following arguments are supported:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Notification Hub Authorization Rule can be imported using the resource id, e.g.

terraform import azurerm_notification_hub_authorization_rule.rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.NotificationHubs/namespaces/namespace1/notificationHubs/hub1/authorizationRules/rule1