Open mike-ntk opened 5 months ago
Voting for Prioritization
Volunteering to Work on This Issue
Hi @mike-ntk! The provider doesn't directly integrate with the Google Cloud Messaging API, but via the AWS Pinpoint API. It looks like the same Pinpoint GCM API endpoint is used to allow FCM configuration with the addition of the two missing attributes ServiceJson
and DefaultAuthenticationMethod
so I think the best way forward here is to add those attributes rather than create a new resource.
Hi @breathingdust! Thanks for your input. Main idea behind the new resource was to match current AWS terminology, but the proposed solution with the existing resource would work just fine.
There is the same issue with aws_sns_platform_application
: #35721
Just wondering if it is expected that the same fix provided as part of https://github.com/hashicorp/terraform-provider-aws/issues/35721 (ie just sending the json token file as the credentials) is expected to work for this resource as well? We are about a week away from Google deprecating FCM and the previous approach failing.
When we apply the same fix associated with the aws_sns_platform_application
by sending the json token file contents to the aws_pinpoint_gcm_channel
via the api_key
we get a failure:
Error: putting Pinpoint GCM Channel for application asdfasdfasdfasdfasdfasdfasdfasdfsasdf: BadRequestException: FCM returned 401 Unauthorized
{
RespMetadata: {
StatusCode: 400,
RequestID: "61441f97-73f7-4c59-a5d7-e4c96303da21"
},
Message_: "FCM returned 401 Unauthorized"
}
This approach however worked fine using the same key for our aws_sns_platform_application
resources, so we dont think it is a problem with permissions.
Anyone have this working? Or does this require a fix in the provider?
Just wondering if it is expected that the same fix provided as part of #35721 (ie just sending the json token file as the credentials) is expected to work for this resource as well? We are about a week away from Google deprecating FCM and the previous approach failing.
When we apply the same fix associated with the
aws_sns_platform_application
by sending the json token file contents to theaws_pinpoint_gcm_channel
via theapi_key
we get a failure:Error: putting Pinpoint GCM Channel for application asdfasdfasdfasdfasdfasdfasdfasdfsasdf: BadRequestException: FCM returned 401 Unauthorized { RespMetadata: { StatusCode: 400, RequestID: "61441f97-73f7-4c59-a5d7-e4c96303da21" }, Message_: "FCM returned 401 Unauthorized" }
This approach however worked fine using the same key for our
aws_sns_platform_application
resources, so we dont think it is a problem with permissions.Anyone have this working? Or does this require a fix in the provider?
I just tried this today and hit the same error. Looks like we do need the provider update.
Description
Existing resource
aws_pinpoint_gcm_channel
uses Google Cloud Messaging API which is going to be deprecated by 6/20/2024"If you are an existing user of the legacy HTTP or XMPP APIs (deprecated on 6/20/2023), you must migrate to the latest Firebase Cloud Messaging API (HTTP v1) by 6/20/2024"
Official migration manual https://firebase.google.com/docs/cloud-messaging/migrate-v1
Requested Resource(s) and/or Data Source(s)
Potential Terraform Configuration
No response
References
Would you like to implement a fix?
No