Based on your comment, @mrchadmwood, it would appear the missing code would be something like :
resource "aws_cognito_user_pool_client" "client" {
name = "client"
user_pool_id = aws_cognito_user_pool.user_pool.id
generate_secret = true
allowed_oauth_flows_user_pool_client = true
allowed_oauth_flows = ["code"]
allowed_oauth_scopes = ["email", "openid", "profile"]
supported_identity_providers = ["COGNITO"]
callback_urls = ["https://example.com"] # One could add a local dev url like http://localhost:5001 during local dev phase for local testing only. In which case, you'd need to change the indexing in your output below
logout_urls = ["https://example.com"]
}
output "hosted_ui_url" {
value = "https://${aws_cognito_user_pool_domain.hosted_ui.domain}/login?response_type=code&client_id=${aws_cognito_user_pool_client.client.id}&redirect_uri=${aws_cognito_user_pool_client.client.callback_urls[0]}"
}
See: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cognito_user_pool_client#create-a-user-pool-client-with-cognito-as-the-identity-provider for canonical reference