This is an unfortunate aspect of the Cognito API, and is somewhat surprisingly also true in CloudFormation and in Terraform.
I spent some time a few months back trying to fix this - and I believe it is possible to fix in both Pulumi and Terraform - but I wasn’t able to finish up the work at the time. If you open an issue to track this, I’ll see if I can dust that work off.
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.