I couldn’t find any documentation about how to set a Facebook API version in Terraform when integrating an AWS Cognito User Pool with it.
The block below can be deployed without any errors:
resource "aws_cognito_identity_provider" "facebook_identity_provider" {
provider_name = "Facebook"
provider_type = "Facebook"
user_pool_id = aws_cognito_user_pool.global_user_pool.id
provider_details = {
authorize_scopes = "email"
client_id = "<client-id>"
client_secret = "<client-secret>
}
attribute_mapping = {
email = "email"
username = "id"
}
}
But then in the AWS dashboard I see this warning:
Facebook is going to deprecate Ver. 2.12 by May 1st, by which Cognito will remove our support for this API. We encourage you to select another version of API and check your attribute mappings.
The latest version is v6.0, how to set it?
2
Answers
It can be done with
api_version
insideprovider_details
as below:This can also be accomplished using the AWS Cognito console.
Old Cognito Console
Facebook
) -> Select the Facebook graph API version you are looking for from the dropdown menu.New Cognito Console
Sign-in Experience
-> Select the Identity provider (Facebook
in this case)Edit
button of Attribute mapping