Azure Messaging Notification Hub
This page shows how to write Terraform and Azure Resource Manager for Messaging Notification Hub and write them securely.
azurerm_notification_hub (Terraform)
The Notification Hub in Messaging can be configured in Terraform with the resource name azurerm_notification_hub. The following sections describe 8 examples of how to use the resource and its parameters.
Example Usage from GitHub
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" "notification_hub" {
name = var.azurerm_notification_hub_name
namespace_name = azurerm_notification_hub_namespace.notification_hub_ns.name
resource_group_name = var.azurerm_resource_group
location = azurerm_notification_hub_namespace.notification_hub_ns.location
resource "azurerm_notification_hub" "this" {
location = var.location
name = var.name
namespace_name = var.namespace_name
resource_group_name = var.resource_group_name
resource "azurerm_notification_hub" "this" {
location = var.location
name = var.name
namespace_name = var.namespace_name
resource_group_name = var.resource_group_name
tags = var.tags
resource "azurerm_notification_hub" "main" {
count = length(var.notificationHubs)
name = element(var.notificationHubs, count.index).nh_name
namespace_name = azurerm_notification_hub_namespace.main.name
resource_group_name = var.nh_resource_group_name
location = var.nh_location
resource "azurerm_notification_hub" "notification_hub" {
name = local.resource_name
namespace_name = azurerm_notification_hub_namespace.notification_hub_ns.name
resource_group_name = var.resource_group_name
location = var.region
resource "azurerm_notification_hub" "NHubs" {
name = "Hub-Terraform"
namespace_name = azurerm_notification_hub_namespace.namespace.name
resource_group_name = azurerm_resource_group.RGroup.name
location = azurerm_resource_group.RGroup.location
resource "azurerm_notification_hub" "NHubs" {
name = "Hub-Terraform"
namespace_name = azurerm_notification_hub_namespace.namespace.name
resource_group_name = azurerm_resource_group.RGroup.name
location = azurerm_resource_group.RGroup.location
Parameters
-
idoptional computed - string -
locationrequired - string -
namerequired - string -
namespace_namerequired - string -
resource_group_namerequired - string -
tagsoptional - map from string to string -
apns_credentiallist block-
application_moderequired - string -
bundle_idrequired - string -
key_idrequired - string -
team_idrequired - string -
tokenrequired - string
-
-
gcm_credentiallist block-
api_keyrequired - string
-
-
timeoutssingle block
Explanation in Terraform Registry
Manages a Notification Hub within a Notification Hub Namespace.
Microsoft.NotificationHubs/namespaces/notificationHubs (Azure Resource Manager)
The namespaces/notificationHubs in Microsoft.NotificationHubs can be configured in Azure Resource Manager with the resource name Microsoft.NotificationHubs/namespaces/notificationHubs. 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
apiVersionrequired - stringlocationoptional - stringResource location
namerequired - stringThe notification hub name.
propertiesrequiredadmCredentialoptionalpropertiesoptionalauthTokenUrloptional - stringThe URL of the authorization token.
clientIdoptional - stringThe client identifier.
clientSecretoptional - stringThe credential secret access key.
apnsCredentialoptionalpropertiesoptionalapnsCertificateoptional - stringThe APNS certificate. Specify if using Certificate Authentication Mode.
appIdoptional - stringThe issuer (iss) registered claim key. The value is a 10-character TeamId, obtained from your developer account. Specify if using Token Authentication Mode.
appNameoptional - stringThe name of the application or BundleId. Specify if using Token Authentication Mode.
certificateKeyoptional - stringThe APNS certificate password if it exists.
endpointoptional - stringThe APNS endpoint of this credential. If using Certificate Authentication Mode and Sandbox specify 'gateway.sandbox.push.apple.com'. If using Certificate Authentication Mode and Production specify 'gateway.push.apple.com'. If using Token Authentication Mode and Sandbox specify 'https://api.development.push.apple.com:443/3/device'. If using Token Authentication Mode and Production specify 'https://api.push.apple.com:443/3/device'.
keyIdoptional - stringA 10-character key identifier (kid) key, obtained from your developer account. Specify if using Token Authentication Mode.
thumbprintoptional - stringThe APNS certificate thumbprint. Specify if using Certificate Authentication Mode.
tokenoptional - stringProvider Authentication Token, obtained through your developer account. Specify if using Token Authentication Mode.
authorizationRulesoptional arrayrightsoptional - arrayThe rights associated with the rule.
baiduCredentialoptionalpropertiesoptionalbaiduApiKeyoptional - stringBaidu Api Key.
baiduEndPointoptional - stringBaidu Endpoint.
baiduSecretKeyoptional - stringBaidu Secret Key
gcmCredentialoptionalpropertiesoptionalgcmEndpointoptional - stringThe FCM legacy endpoint. Default value is 'https://fcm.googleapis.com/fcm/send'
googleApiKeyoptional - stringThe Google API key.
mpnsCredentialoptionalpropertiesoptionalcertificateKeyoptional - stringThe certificate key for this credential.
mpnsCertificateoptional - stringThe MPNS certificate.
thumbprintoptional - stringThe MPNS certificate Thumbprint
nameoptional - stringThe NotificationHub name.
registrationTtloptional - stringThe RegistrationTtl of the created NotificationHub
wnsCredentialoptionalpropertiesoptionalpackageSidoptional - stringThe package ID for this credential.
secretKeyoptional - stringThe secret key.
windowsLiveEndpointoptional - stringThe Windows Live endpoint.
skuoptionalcapacityoptional - integerThe capacity of the resource
familyoptional - stringThe Sku Family
namerequired - stringName of the notification hub sku.
sizeoptional - stringThe Sku size
tieroptional - stringThe tier of particular sku
tagsoptional - stringResource tags
typerequired - string
Frequently asked questions
What is Azure Messaging Notification Hub?
Azure Messaging Notification Hub 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 Notification Hub?
For Terraform, the dmaxim/wimc-net, sidhlipu/terraform and kevinhead/azurerm source code examples are useful. See the Terraform Example section for further details.