-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Azure Notification Hub FCM credentials #25215
Comments
Hi any updates regarding this issue? |
I do not understand... it looks like almost a dead prjoect ... there are differents resources that needs to be updates and no feedback from the team |
Any updates? |
No updates on this so far... # Add providers
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "3.109.0"
}
azapi = {
source = "Azure/azapi"
version = "1.15.0"
}
}
}
provider "azurerm" {
features {}
}
provider "azapi" {}
variable "app_name" {
type = string
description = ""
default = "my-app"
}
# Create resource group
resource "azurerm_resource_group" "resource_group" {
name = "rg-${var.app_name}"
location = "West Europe"
}
# Create notification hub namespace
resource "azurerm_notification_hub_namespace" "notification_hub_namespace" {
name = "nhn-${var.app_name}"
resource_group_name = azurerm_resource_group.resource_group.name
location = azurerm_resource_group.resource_group.location
namespace_type = "NotificationHub"
sku_name = "Free"
depends_on = [
azurerm_resource_group.resource_group
]
}
# Create notification hub
resource "azurerm_notification_hub" "notification_hub" {
name = "nh-${var.app_name}"
namespace_name = azurerm_notification_hub_namespace.notification_hub_namespace.name
resource_group_name = azurerm_resource_group.resource_group.name
location = azurerm_resource_group.resource_group.location
apns_credential {
application_mode = "Production"
bundle_id = var.apns_bundle_id
key_id = var.apns_key_id
team_id = var.apns_team_id
token = var.apns_token
}
depends_on = [
azurerm_resource_group.resource_group,
azurerm_notification_hub_namespace.notification_hub_namespace
]
}
# Add fcm to notification hub
resource "azapi_update_resource" "notification_hub_fcm_append" {
type = "Microsoft.NotificationHubs/namespaces/notificationHubs@2023-10-01-preview"
resource_id = azurerm_notification_hub.notification_hub.id
body = jsonencode({
properties = {
fcmV1Credential = {
properties = {
clientEmail = var.fcm_client_email
privateKey = var.fcm_private_key
projectId = var.fcm_project_id
}
}
}
})
depends_on = [
azurerm_resource_group.resource_group,
azurerm_notification_hub_namespace.notification_hub_namespace,
azurerm_notification_hub.notification_hub
]
} |
Is there an existing issue for this?
Community Note
Description
We need a new FCM credentials block in Azure Notification module.
Migration from GCM to FCM is required before July 2024.
https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-gcm-to-fcm
https://learn.microsoft.com/en-us/azure/notification-hubs/firebase-migration-rest#create-google-service-account-json-file
New or Affected Resource(s)/Data Source(s)
azurerm_notification_hub
Potential Terraform Configuration
References
MicrosoftDocs/azure-docs#93522
The text was updated successfully, but these errors were encountered: