File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,14 @@ package resources
2
2
3
3
import (
4
4
"context"
5
-
6
5
"fmt"
7
6
8
7
"github.com/aws/aws-sdk-go/aws"
9
8
"github.com/aws/aws-sdk-go/service/configservice"
10
9
11
10
"github.com/ekristen/libnuke/pkg/registry"
12
11
"github.com/ekristen/libnuke/pkg/resource"
12
+ "github.com/ekristen/libnuke/pkg/types"
13
13
14
14
"github.com/ekristen/aws-nuke/pkg/nuke"
15
15
)
@@ -69,6 +69,10 @@ func (f *ConfigServiceConfigRule) Filter() error {
69
69
return fmt .Errorf ("cannot remove rule owned by securityhub.amazonaws.com" )
70
70
}
71
71
72
+ if aws .StringValue (f .createdBy ) == "config-conforms.amazonaws.com" {
73
+ return fmt .Errorf ("cannot remove rule owned by config-conforms.amazonaws.com" )
74
+ }
75
+
72
76
return nil
73
77
}
74
78
@@ -83,3 +87,9 @@ func (f *ConfigServiceConfigRule) Remove(_ context.Context) error {
83
87
func (f * ConfigServiceConfigRule ) String () string {
84
88
return * f .configRuleName
85
89
}
90
+
91
+ func (f * ConfigServiceConfigRule ) Properties () types.Properties {
92
+ props := types .NewProperties ()
93
+ props .Set ("CreatedBy" , f .createdBy )
94
+ return props
95
+ }
You can’t perform that action at this time.
0 commit comments