I am creating a cognito user pool using terraform 0.12.20.
I want to enable email verification by sending a code to the users email. I can see how to do this in the UI but not using terraform. The cognito API documentation doesn't seem to have any reference to enabling verification.
My terraform resource is:
resource "aws_cognito_user_pool" "pool" {
name = "pool"
username_attributes = ["email"]
lambda_config {
pre_sign_up = var.pre_sign_up_lambda.arn
}
verification_message_template {
default_email_option = "CONFIRM_WITH_CODE"
}
email_configuration {
email_sending_account = "COGNITO_DEFAULT"
}
password_policy {
minimum_length = 8
require_lowercase = true
require_numbers = true
require_symbols = true
require_uppercase = true
}
}