Skip to content

Commit

Permalink
Merge pull request #20530 from josephkphan/main
Browse files Browse the repository at this point in the history
Fixing typo for passwords field in elasticache user and extending timeouts
  • Loading branch information
ewbankkit authored Aug 17, 2021
2 parents 6abf27d + 9a71474 commit e8813c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changelog/20530.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_elasticache_user: Correctly update `passwords`
```
5 changes: 2 additions & 3 deletions aws/resource_aws_elasticache_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ func resourceAwsElasticacheUserUpdate(d *schema.ResourceData, meta interface{})
hasChange = true
}

if d.HasChange("password") {
req.Passwords = expandStringSet(d.Get("password").(*schema.Set))
if d.HasChange("passwords") {
req.Passwords = expandStringSet(d.Get("passwords").(*schema.Set))
hasChange = true
}

Expand All @@ -190,7 +190,6 @@ func resourceAwsElasticacheUserUpdate(d *schema.ResourceData, meta interface{})
}

}

// Tags are currently only supported in AWS Commercial.
if d.HasChange("tags_all") && meta.(*AWSClient).partition == endpoints.AwsPartitionID {
o, n := d.GetChange("tags_all")
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_elasticache_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ resource "aws_elasticache_user" "test" {
user_name = "username1"
access_string = "on ~* +@all"
engine = "REDIS"
passwords = ["password123456789"]
passwords = ["password234567891", "password345678912"]
}
`, rName))
}
Expand Down

0 comments on commit e8813c9

Please sign in to comment.