Kie*_*ngs 8 amazon-cognito terraform terraform-provider-aws
我正在使用 terraform 0.12.20 创建一个 cognito 用户池。
我想通过向用户电子邮件发送代码来启用电子邮件验证。我可以在 UI 中看到如何执行此操作,但不能使用 terraform。cognito API 文档似乎没有任何关于启用验证的参考。
我的地形资源是:
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
}
}
Run Code Online (Sandbox Code Playgroud)
Kie*_*ngs 12
经过一番尝试和错误后,我似乎错误地理解了文档。
有一个auto_verified_attributes
资源aws_cognito_user_pool
。这是您想要启用验证的属性列表。
例如,在上面的资源中,我需要添加auto_verified_attributes = ["email"]
启用代码验证电子邮件的功能。
归档时间: |
|
查看次数: |
3825 次 |
最近记录: |