Azure Notification Hub Property at path properties.pnsCredentials cannot be changed

Tommy Le 0 Reputation points
2024-05-06T22:55:17.92+00:00

Looking to use apiVersion 2023-10-01-preview bicep in order to the notification hub. It's continuously getting this error

"message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"","message":"Property at path properties.pnsCredentials cannot be

changed"}]}}

Anyone has come across this? Any help is much appreciated.

Here is the bicep template that is used to provisioned this resource.

resource namespace 'Microsoft.NotificationHubs/namespaces@2023-10-01-preview' = {
  name: namespaceName
  location: location
  sku: {
    name: sku
  }
  tags: tags
  properties: {
    namespaceType: 'NotificationHub'
    replicationRegion: replicationRegion
    zoneRedundancy: zoneRedundancy
    pnsCredentials: {
       apnsCredential: appleHubProperties.apnsCredential
       gcmCredential: null
       fcmV1Credential: null
       admCredential: null
       baiduCredential: null
       browserCredential: null
       mpnsCredential: null
       wnsCredential: null
       xiaomiCredential: null
    }
  }
}

resource notificationHub 'Microsoft.NotificationHubs/namespaces/notificationHubs@2023-10-01-preview' = {
  name: notificationHubName
  sku: {
    name: sku
  }
  location: location
  parent: namespace
  tags: tags
  
  
}
Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
295 questions
{count} votes