From bf5819f38755cd3c3322ce03a3dcbe80ad3ea46c Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Thu, 29 Mar 2018 02:25:51 +0900 Subject: [PATCH] Apply email_verification_message when it changed --- aws/resource_aws_cognito_user_pool.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aws/resource_aws_cognito_user_pool.go b/aws/resource_aws_cognito_user_pool.go index 0c4b4e4d55f..2c84906ae62 100644 --- a/aws/resource_aws_cognito_user_pool.go +++ b/aws/resource_aws_cognito_user_pool.go @@ -787,6 +787,16 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) configs := v.([]interface{}) config, ok := configs[0].(map[string]interface{}) + if d.HasChange("email_verification_message") { + config["email_message"] = d.Get("email_verification_message") + } + if d.HasChange("email_verification_subject") { + config["email_subject"] = d.Get("email_verification_subject") + } + if d.HasChange("sms_verification_message") { + config["sms_message"] = d.Get("sms_verification_message") + } + if ok && config != nil { params.VerificationMessageTemplate = expandCognitoUserPoolVerificationMessageTemplate(config) }