Azure Messaging Namespace

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

azurerm_relay_namespace (Terraform)

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

Example Usage from GitHub

service-bus.tf#L1
resource "azurerm_relay_namespace" "service-bus-relay" {
  name                = var.service_bus_name
  location            = var.location
  resource_group_name = data.azurerm_resource_group.resource-group.name
  sku_name            = "Standard" ### At this time the only supported value is Standard
  tags                = var.tags
namespaces.tf#L1
resource "azurerm_relay_namespace" "example" {
  name                = "example-relay"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name

  sku_name = "Standard"
main.tf#L7
resource "azurerm_relay_namespace" "this" {
  location            = var.location
  name                = var.name
  resource_group_name = var.resource_group_name
  sku_name            = var.sku_name
  tags                = var.tags
main.tf#L7
resource "azurerm_relay_namespace" "this" {
  location            = var.location
  name                = var.name
  resource_group_name = var.resource_group_name
  sku_name            = var.sku_name
  tags                = var.tags
main.tf#L16
resource "azurerm_relay_namespace" "moorepay" {
  name                = "moorepay-relay"
  location            = azurerm_resource_group.relay.location
  resource_group_name = azurerm_resource_group.relay.name
  sku_name            = "Standard"
}

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 an Azure Relay Namespace.

Microsoft.Relay/namespaces (Azure Resource Manager)

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

Example Usage from GitHub

Microsoft.Relay.tests.json#L7
        "type": "Microsoft.Relay/namespaces",
        "apiVersion": "2017-04-01",
        "location": "West Us",
        "name": "NamespaceTest",
        "sku": {
          "name": "Standard",
azuredeploy.json#L61
            "type": "Microsoft.Relay/namespaces",
            "apiVersion": "2017-04-01",
            "name": "[parameters('RelayNameSpaceName')]",
            "location": "[resourceGroup().location]",
            "sku": {
                "name": "Standard",
HcExampleTemplate.json#L27
            "type": "Microsoft.Relay/namespaces",
            "apiVersion": "2018-01-01-preview",
            "name": "[variables('servicebus_name')]",
            "location": "[parameters('resource_location')]",
            "sku": {
                "name": "Standard",

Parameters

  • apiVersion required - string
  • location required - string

    Resource location.

  • name required - string

    The namespace name

  • properties required
    • sku optional
        • name required - string

          Name of this SKU.

        • tier optional - string

          The tier of this 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 josepht96/learning, dmaxim/wimc-net and kevinhead/azurerm source code examples are useful. See the Terraform Example section for further details.

    For Azure Resource Manager, the Azure/autorest.azureresourceschema, Lagler-Gruener/AzureTemplates and JoshuaTheMiller/Experiments source code examples are useful. See the Azure Resource Manager Example section for further details.