-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Count UTF-8 string length by # of chars vs. bytes in message and subject args for aws_cognito_user_pool #36661
fix: Count UTF-8 string length by # of chars vs. bytes in message and subject args for aws_cognito_user_pool #36661
Conversation
Community NoteVoting for Prioritization
For Submitters
|
0afa864
to
0712e62
Compare
subject args for aws_cognito_user_pool
0712e62
to
4e69533
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccCognitoIDPUserPool_withVerificationMessageTemplate\|TestAccCognitoIDPUserPool_withVerificationMessageTemplateUTF8' PKG=cognitoidp
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.21.8 test ./internal/service/cognitoidp/... -v -count 1 -parallel 20 -run=TestAccCognitoIDPUserPool_withVerificationMessageTemplate\|TestAccCognitoIDPUserPool_withVerificationMessageTemplateUTF8 -timeout 360m
=== RUN TestAccCognitoIDPUserPool_withVerificationMessageTemplate
=== PAUSE TestAccCognitoIDPUserPool_withVerificationMessageTemplate
=== RUN TestAccCognitoIDPUserPool_withVerificationMessageTemplateUTF8
=== PAUSE TestAccCognitoIDPUserPool_withVerificationMessageTemplateUTF8
=== CONT TestAccCognitoIDPUserPool_withVerificationMessageTemplate
=== CONT TestAccCognitoIDPUserPool_withVerificationMessageTemplateUTF8
--- PASS: TestAccCognitoIDPUserPool_withVerificationMessageTemplate (37.90s)
--- PASS: TestAccCognitoIDPUserPool_withVerificationMessageTemplateUTF8 (37.93s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cognitoidp 50.241s
@xxx Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.44.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
This PR is to fix the validation functions of the
*message
and*subject
arguments in theaws_cognito_user_pool
resource, which allows UTF-8 characters, so that the # of characters are counted by runes and not by bytes.Note: When I initially added a new test case with max size messages and subjects, the API will fail with a 413 object too large error. I believe this is a bug with the AWS API since the API specs should technically allow messages up to 20000 characters, including UTF-8. To allow the test case to pass, I've reduced the message sizes to 1000 characters. Meanwhile I've opened an AWS support case to see if they can address it. So be aware that even with this fix, you probably can't use very long messages.
Relations
Closes #32607
References
Referred to CreateUserPool and Configuring SMS and email verification messages and user invitation messages for the specs.
Output from Acceptance Testing