Skip to content

Commit 5723826

Browse files
authored
Filter open-access MemoryDB ACL (#1089)
1 parent ab396a4 commit 5723826

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

resources/memorydb-acl.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package resources
22

33
import (
4+
"fmt"
5+
46
"github.com/aws/aws-sdk-go/aws"
57
"github.com/aws/aws-sdk-go/aws/session"
68
"github.com/aws/aws-sdk-go/service/memorydb"
@@ -55,6 +57,14 @@ func ListMemoryDBACLs(sess *session.Session) ([]Resource, error) {
5557
return resources, nil
5658
}
5759

60+
func (i *MemoryDBACL) Filter() error {
61+
if *i.name == "open-access" {
62+
return fmt.Errorf("open-access ACL can't be deleted")
63+
} else {
64+
return nil
65+
}
66+
}
67+
5868
func (i *MemoryDBACL) Remove() error {
5969
params := &memorydb.DeleteACLInput{
6070
ACLName: i.name,

0 commit comments

Comments
 (0)