Skip to content

Commit

Permalink
detect auto_verified_attributes changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Puneeth-n committed Mar 14, 2018
1 parent b2e0bf5 commit 7b91f39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions aws/resource_aws_cognito_user_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,8 @@ func resourceAwsCognitoUserPoolRead(d *schema.ResourceData, meta interface{}) er
Resource: fmt.Sprintf("userpool/%s", d.Id()),
}
d.Set("arn", arn.String())
if resp.UserPool.AutoVerifiedAttributes != nil {
d.Set("auto_verified_attributes", flattenStringList(resp.UserPool.AutoVerifiedAttributes))
}
d.Set("auto_verified_attributes", flattenStringList(resp.UserPool.AutoVerifiedAttributes))

if resp.UserPool.EmailVerificationSubject != nil {
d.Set("email_verification_subject", *resp.UserPool.EmailVerificationSubject)
}
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_cognito_user_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func TestAccAWSCognitoUserPool_withAliasAttributes(t *testing.T) {
testAccCheckAWSCognitoUserPoolExists("aws_cognito_user_pool.pool"),
resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "alias_attributes.#", "1"),
resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "alias_attributes.1888159429", "preferred_username"),
resource.TestCheckNoResourceAttr("aws_cognito_user_pool.pool", "auto_verified_attributes.#"),
resource.TestCheckResourceAttr("aws_cognito_user_pool.pool", "auto_verified_attributes.#", "0"),
),
},
{
Expand Down

0 comments on commit 7b91f39

Please sign in to comment.