terraform-provider-aws
terraform-provider-aws copied to clipboard
[New Resource]: Add Pinpoint FCM channel resource
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)
aws_pinpoint_fcm_channel
Potential Terraform Configuration
No response
References
- https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-channels-gcm.html
Would you like to implement a fix?
No
Community Note
Voting for Prioritization
- Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
- Please see our prioritization guide for information on how we prioritize.
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
- If you are interested in working on this issue, please leave a comment.
- If this would be your first contribution, please review the contribution guide.
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.
[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.
Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.
This functionality has been released in v5.63.1 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!