Azure Messaging Namespace

This page shows how to write Terraform and Azure Resource Manager for Messaging Namespace and write them securely.

azurerm_notification_hub_namespace (Terraform)

The Namespace in Messaging can be configured in Terraform with the resource name azurerm_notification_hub_namespace. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

notification_hub_namespace_test.tf#L11
resource "azurerm_notification_hub_namespace" "basicbelow10M" {
  name                = "myappnamespace"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  namespace_type      = "NotificationHub"

notification_hub_namespace_test.tf#L11
resource "azurerm_notification_hub_namespace" "basicbelow10M" {
  name                = "myappnamespace"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  namespace_type      = "NotificationHub"

namespaces.tf#L1
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"

main.tf#L1
resource "azurerm_notification_hub_namespace" "notification_hub_ns" {
  name                = var.azurerm_ns_name
  resource_group_name = var.azurerm_resource_group
  location            = var.azurerm_resource_group_location
  namespace_type      = var.azurerm_ns_type

main.tf#L7
resource "azurerm_notification_hub_namespace" "this" {
  enabled             = var.enabled
  location            = var.location
  name                = var.name
  namespace_type      = var.namespace_type
  resource_group_name = var.resource_group_name
main.tf#L7
resource "azurerm_notification_hub_namespace" "this" {
  enabled             = var.enabled
  location            = var.location
  name                = var.name
  namespace_type      = var.namespace_type
  resource_group_name = var.resource_group_name
main.tf#L1
resource "azurerm_notification_hub_namespace" "main" {
  name                = var.nh_namespace_name
  resource_group_name = var.nh_resource_group_name
  location            = var.nh_location
  namespace_type      = "NotificationHub"

main.tf#L35
resource "azurerm_notification_hub_namespace" "notification_hub_ns" {
  name                = local.ntfns_resource_name
  resource_group_name = var.resource_group_name
  location            = var.region
  namespace_type      = var.ntfns_namespace_type
  sku_name            = var.ntfns_sku_name
main.tf#L225
resource "azurerm_notification_hub_namespace" "namespace" {
  name                = "NHUB-Terraform"
  resource_group_name = azurerm_resource_group.RGroup.name
  location            = azurerm_resource_group.RGroup.location
  namespace_type      = "NotificationHub"

main.tf#L233
resource "azurerm_notification_hub_namespace" "namespace" {
  name                = "NHUB-Terraform"
  resource_group_name = azurerm_resource_group.RGroup.name
  location            = azurerm_resource_group.RGroup.location
  namespace_type      = "NotificationHub"

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Notification Hub Namespace.

Microsoft.NotificationHubs/namespaces (Azure Resource Manager)

The namespaces in Microsoft.NotificationHubs can be configured in Azure Resource Manager with the resource name Microsoft.NotificationHubs/namespaces. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

  • apiVersion required - string
  • location optional - string

    Resource location

  • name required - string

    The namespace name.

  • properties required
      • createdAt optional - string

        The time the namespace was created.

      • critical optional - boolean

        Whether or not the namespace is set as Critical.

      • dataCenter optional - string

        Data center for the namespace

      • enabled optional - boolean

        Whether or not the namespace is currently enabled.

      • name optional - string

        The name of the namespace.

      • namespaceType optional - string

        The namespace type.

      • provisioningState optional - string

        Provisioning state of the Namespace.

      • region optional - string

        Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe

      • scaleUnit optional - string

        ScaleUnit where the namespace gets created

      • serviceBusEndpoint optional - string

        Endpoint you can use to perform NotificationHub operations.

      • status optional - string

        Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting

      • subscriptionId optional - string

        The Id of the Azure subscription associated with the namespace.

      • updatedAt optional - string

        The time the namespace was updated.

  • sku optional
      • capacity optional - integer

        The capacity of the resource

      • family optional - string

        The Sku Family

      • name required - string

        Name of the notification hub sku.

      • size optional - string

        The Sku size

      • tier optional - string

        The tier of particular sku

  • tags optional - string

    Resource tags

  • type required - string

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 gilyas/infracost, infracost/infracost and dmaxim/wimc-net source code examples are useful. See the Terraform Example section for further details.