-
Notifications
You must be signed in to change notification settings - Fork 725
Add elasticache user and group support #1044
Add elasticache user and group support #1044
Conversation
Adding go modules for elasticache users and groups. Adding filtering for subnet groups to ignore the default elasticache subnet group.
Adding working code for packages cleanup.
Moving opensearch changes to separate branch.
resources/elasticache-users.go
Outdated
func ListElasticacheUsers(sess *session.Session) ([]Resource, error) { | ||
svc := elasticache.New(sess) | ||
|
||
params := &elasticache.DescribeUsersInput{MaxRecords: aws.Int64(100)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This properly needs paging as well, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bjoernhaeuser paging added.
resources/elasticache-usergroups.go
Outdated
func ListElasticacheUserGroups(sess *session.Session) ([]Resource, error) { | ||
svc := elasticache.New(sess) | ||
|
||
params := &elasticache.DescribeUserGroupsInput{MaxRecords: aws.Int64(100)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This properly needs paging as well, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bjoernhaeuser paging added.
Reverting versions to match oreilly-main
func (i *ElasticacheUserGroup) String() string { | ||
return *i.groupId | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply - would you mind adding properties for both resources as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@der-eismann I have added properties to both resources. Are these sufficient or are there additional properties you would like to see?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No these are fine, thanks!
This PR includes two new modules for Elasticache Users and User Groups.
Also including a filter update to ignore the default subnet for elasticache.
Testing
Elasticache users and users groups were created. using the setup code mentioned below, and then AWS Nuke was used to clean these resources up, specifying
ElasticacheUser
andElasticacheUserGroup
. The resources were handle as expected:Setup code