Azure Messaging Namespace
This page shows how to write Terraform and Azure Resource Manager for Messaging Namespace and write them securely.
azurerm_eventhub_namespace (Terraform)
The Namespace in Messaging can be configured in Terraform with the resource name azurerm_eventhub_namespace. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_eventhub_namespace" "basic" {
name = "acceptanceTestEventHubNamespace"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku = "Basic"
}
resource "azurerm_eventhub_namespace" "example" {
name = var.event_hubs_namespace
location = azurerm_resource_group.policy-rg.location
resource_group_name = azurerm_resource_group.policy-rg.name
sku = "Standard"
capacity = 1
resource "azurerm_eventhub_namespace" "example" {
sku = var.sku
name = var.name
location = var.location
resource_group_name = var.resource_group_name
resource "azurerm_eventhub_namespace" "eh_ns" {
name = var.res_eh_namespace_name
location = var.res_location
resource_group_name = var.res_eh_rg_name
sku = var.res_eh_ns_sku
capacity = var.res_eh_ns_capacity
resource "azurerm_eventhub_namespace" "basic" {
name = "acceptanceTestEventHubNamespace"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku = "Basic"
}
resource "azurerm_eventhub_namespace" "raj-eventhub-namespace" {
name = "raj-oh-eventhub"
location = var.resource-group-location
resource_group_name = var.resource-group-name
sku = "Standard"
capacity = 2
resource "azurerm_eventhub_namespace" "eventhub_namespace" {
location = var.location
sku = var.sku_name
name = var.eventhub_namespace_name
resource_group_name = var.resource_group_name
}
resource "azurerm_eventhub_namespace" "example" {
name = "example-namespace"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku = "Standard"
capacity = 2
resource "azurerm_eventhub_namespace" "example" {
name = var.eventhub_namespace_name
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku = var.sku
capacity = 1
resource "azurerm_eventhub_namespace" "evhubiotnmspace" {
name = var.event_hub_name_space
resource_group_name = azurerm_resource_group.rg.name
location = var.location
sku = "Basic"
}
Parameters
-
auto_inflate_enabledoptional - bool -
capacityoptional - number -
dedicated_cluster_idoptional - string -
default_primary_connection_stringoptional computed - string -
default_primary_connection_string_aliasoptional computed - string -
default_primary_keyoptional computed - string -
default_secondary_connection_stringoptional computed - string -
default_secondary_connection_string_aliasoptional computed - string -
default_secondary_keyoptional computed - string -
idoptional computed - string -
locationrequired - string -
maximum_throughput_unitsoptional computed - number -
namerequired - string -
network_rulesetsoptional computed - list of object-
default_action- string -
ip_rule- list of object -
trusted_service_access_enabled- bool -
virtual_network_rule- list of object-
ignore_missing_virtual_network_service_endpoint- bool -
subnet_id- string
-
-
-
resource_group_namerequired - string -
skurequired - string -
tagsoptional - map from string to string -
zone_redundantoptional - bool -
identitylist block-
principal_idoptional computed - string -
tenant_idoptional computed - string -
typerequired - string
-
-
timeoutssingle block
Explanation in Terraform Registry
Manages an EventHub Namespace.
Microsoft.EventHub/namespaces (Azure Resource Manager)
The namespaces in Microsoft.EventHub can be configured in Azure Resource Manager with the resource name Microsoft.EventHub/namespaces. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
{
"properties": {
"displayName": "Apply diagnostic settings for Event Grid Topics - EventHub",
"policyType": "Custom",
"mode": "All",
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"sqlServerUsername": {
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"sqlServerUsername": {
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"sqlServerUsername": {
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"suiteName": {
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"region": {
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"region": {
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"suiteName": {
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"suiteName": {
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"region": {
Parameters
apiVersionrequired - stringidentityoptionaltypeoptional - stringType of managed service identity.
userAssignedIdentitiesoptional - undefinedProperties for User Assigned Identities
locationoptional - stringResource location.
namerequired - stringThe Namespace name
propertiesrequiredalternateNameoptional - stringAlternate name specified when alias and namespace names are same.
clusterArmIdoptional - stringCluster ARM ID of the Namespace.
disableLocalAuthoptional - booleanThis property disables SAS authentication for the Event Hubs namespace.
encryptionoptionalkeySourceoptional - stringEnumerates the possible value of keySource for Encryption.
keyVaultPropertiesoptional arrayidentityoptionaluserAssignedIdentityoptional - stringARM ID of user Identity selected for encryption
keyNameoptional - stringName of the Key from KeyVault
keyVaultUrioptional - stringUri of KeyVault
keyVersionoptional - stringKey Version
requireInfrastructureEncryptionoptional - booleanEnable Infrastructure Encryption (Double Encryption)
isAutoInflateEnabledoptional - booleanValue that indicates whether AutoInflate is enabled for eventhub namespace.
kafkaEnabledoptional - booleanValue that indicates whether Kafka is enabled for eventhub namespace.
maximumThroughputUnitsoptional - integerUpper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true)
privateEndpointConnectionsoptional arraypropertiesoptionalprivateEndpointoptionalidoptional - stringThe ARM identifier for Private Endpoint.
privateLinkServiceConnectionStateoptionaldescriptionoptional - stringDescription of the connection state.
statusoptional - stringStatus of the connection.
provisioningStateoptional - stringProvisioning state of the Private Endpoint Connection.
zoneRedundantoptional - booleanEnabling this property creates a Standard Event Hubs Namespace in regions supported availability zones.
skuoptionalcapacityoptional - integerThe Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units.
namerequired - stringName of this SKU.
tieroptional - stringThe billing tier of this particular SKU.
tagsoptional - stringResource tags.
typerequired - 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, timwebster9/azure-policy-logging and sujithq/fb-2021-09-10 source code examples are useful. See the Terraform Example section for further details.
For Azure Resource Manager, the TheCloudScout/AzurePolicyDefinitions, Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace and Azure/Azure-CloudIntelligence-SolutionAuthoringWorkspace source code examples are useful. See the Azure Resource Manager Example section for further details.