How do you enable the AWS Cognito Advanced Security Features option via Terraform or Cloudformation and then configure the Compromised Credentials option?
There doesn't appear to be anything listed on the official doco for this feature
Unfortunately, you can't do this as of now, neither in Terraform nor in CloudFormation, straightforward. Interesting enough, the feature is present in the aws-cli for quite some time now (almost a year since Nov 28, 2017).
What could work as a workaround though is : You can create a null resource and execute an aws-cli command using Terraform OR you can use local-exec
and call aws-cli command there.
P.S. Here you can find more information on the cli command for advanced security features.