terraform-aws-cognito-user-pool
terraform-aws-cognito-user-pool copied to clipboard
Accept custom email_message and email_subject for code verification
The email configuration options for verification message customisation only accept email_message_by_link and email_subject_by_link. This means you cannot customise the email subject and message when using CONFIRM_BY_CODE type.
It would be good to also accept email_message and email_subject parameters so the verification message when using CONFIRM_BY_CODE could also be set.
I've just realised I can set them with the input email_verification_message and email_verification_subject. It would be good if they could also be part of the verification_message_template as email_message and email_subject too, although definitely not required and adds extra complexity (so maybe just a readme update to mention where the setting is)
Hello! I also have the problem with email_message.
According to the terraform docs about Cognito User Pool resource email_message attribute doesn't require to contain {username} placeholder. However, in the code you assigning to email_verification_message attribute the variable that must contain {username} and {####} placeholders. In our project, we can't pass the username to {username} placeholder in the email verification message. See first note here

It would be good to separate verification_message_template and invite_message_template attributes in different variables.