diff --git a/resources/elasticache-users.go b/resources/elasticache-users.go index 1e432b5d..5552eb9e 100644 --- a/resources/elasticache-users.go +++ b/resources/elasticache-users.go @@ -3,7 +3,8 @@ package resources import ( "context" "fmt" - "strings" + + "github.com/gotidy/ptr" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/elasticache" @@ -71,7 +72,7 @@ func (l *ElasticacheUserLister) List(_ context.Context, o interface{}) ([]resour } func (i *ElasticacheUser) Filter() error { - if strings.HasPrefix(*i.userName, "default") { + if ptr.ToString(i.userID) == "default" { return fmt.Errorf("cannot delete default user") } return nil