Creates a Cognito User Pool and configures a Google Identity Provider for user authentication.

Terraform Template

resource "aws_cognito_identity_provider" "example_provider" {

  attribute_mapping = {
    email = "email"
    username = "sub"
  }

  provider_details = {
    authorize_scopes = "email"
    client_id = "your client_id"
    client_secret = "your client_secret"
  }
  provider_name = "Google"
  provider_type = "Google"
  user_pool_id = aws_cognito_user_pool.example.id
  provider = ""
}

resource "aws_cognito_user_pool" "example" {
  auto_verified_attributes = ["email"]
  name = "example-pool"
}