Skip to content

Commit

Permalink
Filter out default subnet group due to error (gruntwork-io#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
james03160927 authored Sep 7, 2023
1 parent 56400f4 commit 8fcb6fd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions aws/resources/elasticache.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,10 @@ func (sg *ElasticacheSubnetGroups) getAll(configObj config.Config) ([]*string, e
&elasticache.DescribeCacheSubnetGroupsInput{},
func(page *elasticache.DescribeCacheSubnetGroupsOutput, lastPage bool) bool {
for _, subnetGroup := range page.CacheSubnetGroups {
if configObj.ElasticacheSubnetGroups.ShouldInclude(config.ResourceValue{
Name: subnetGroup.CacheSubnetGroupName,
}) {
if !strings.Contains(*subnetGroup.CacheSubnetGroupName, "default") &&
configObj.ElasticacheSubnetGroups.ShouldInclude(config.ResourceValue{
Name: subnetGroup.CacheSubnetGroupName,
}) {
subnetGroupNames = append(subnetGroupNames, subnetGroup.CacheSubnetGroupName)
}
}
Expand Down

0 comments on commit 8fcb6fd

Please sign in to comment.