Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit a332229

Browse files
authored
Merge pull request #61 from rebuy-de/fixup-rds-name
Rename rds resouce
2 parents ff080ce + b3610c0 commit a332229

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

cmd/config.go

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ func (c *NukeConfig) resolveDeprecations() error {
7474
"IamUserAccessKeys": "IAMUserAccessKey",
7575
"IamUserGroupAttachement": "IAMUserGroupAttachment",
7676
"IamUserPolicyAttachement": "IAMUserPolicyAttachment",
77+
"RDSCluster": "RDSDBCluster",
7778
}
7879

7980
for _, a := range c.Accounts {

resources/listers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func GetListers(sess *session.Session) []ResourceLister {
9494
kms.ListAliases,
9595
kms.ListKeys,
9696
lambda.ListFunctions,
97-
rds.ListClusers,
97+
rds.ListClusters,
9898
rds.ListInstances,
9999
rds.ListClusterParameterGroups,
100100
rds.ListParameterGroups,

resources/rds-clusters.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import (
55
"github.com/aws/aws-sdk-go/service/rds"
66
)
77

8-
type RDSCluster struct {
8+
type RDSDBCluster struct {
99
svc *rds.RDS
1010
id string
1111
}
1212

13-
func (n *RDSNuke) ListClusers() ([]Resource, error) {
13+
func (n *RDSNuke) ListClusters() ([]Resource, error) {
1414
params := &rds.DescribeDBClustersInput{}
1515
resp, err := n.Service.DescribeDBClusters(params)
1616
if err != nil {
@@ -19,7 +19,7 @@ func (n *RDSNuke) ListClusers() ([]Resource, error) {
1919

2020
resources := make([]Resource, 0)
2121
for _, instance := range resp.DBClusters {
22-
resources = append(resources, &RDSCluster{
22+
resources = append(resources, &RDSDBCluster{
2323
svc: n.Service,
2424
id: *instance.DBClusterIdentifier,
2525
})
@@ -28,7 +28,7 @@ func (n *RDSNuke) ListClusers() ([]Resource, error) {
2828
return resources, nil
2929
}
3030

31-
func (i *RDSCluster) Remove() error {
31+
func (i *RDSDBCluster) Remove() error {
3232
params := &rds.DeleteDBClusterInput{
3333
DBClusterIdentifier: &i.id,
3434
SkipFinalSnapshot: aws.Bool(true),
@@ -42,6 +42,6 @@ func (i *RDSCluster) Remove() error {
4242
return nil
4343
}
4444

45-
func (i *RDSCluster) String() string {
45+
func (i *RDSDBCluster) String() string {
4646
return i.id
4747
}

0 commit comments

Comments
 (0)