Skip to content

Commit 995b7b0

Browse files
committed
refactor(iam-password-policy): standardization
1 parent 51e7c33 commit 995b7b0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

resources/iam-account-setting-password-policy.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package resources
22

33
import (
44
"context"
5-
65
"errors"
76

87
"github.com/aws/aws-sdk-go/aws/awserr"
@@ -11,6 +10,7 @@ import (
1110

1211
"github.com/ekristen/libnuke/pkg/registry"
1312
"github.com/ekristen/libnuke/pkg/resource"
13+
"github.com/ekristen/libnuke/pkg/types"
1414

1515
"github.com/ekristen/aws-nuke/v3/pkg/nuke"
1616
)
@@ -64,15 +64,19 @@ type IAMAccountSettingPasswordPolicy struct {
6464
policy *iam.PasswordPolicy
6565
}
6666

67-
func (e *IAMAccountSettingPasswordPolicy) Remove(_ context.Context) error {
68-
_, err := e.svc.DeleteAccountPasswordPolicy(&iam.DeleteAccountPasswordPolicyInput{})
67+
func (r *IAMAccountSettingPasswordPolicy) Remove(_ context.Context) error {
68+
_, err := r.svc.DeleteAccountPasswordPolicy(&iam.DeleteAccountPasswordPolicyInput{})
6969
if err != nil {
7070
return err
7171
}
7272

7373
return nil
7474
}
7575

76-
func (e *IAMAccountSettingPasswordPolicy) String() string {
76+
func (r *IAMAccountSettingPasswordPolicy) String() string {
7777
return "custom"
7878
}
79+
80+
func (r *IAMAccountSettingPasswordPolicy) Properties() types.Properties {
81+
return types.NewProperties().Set("type", "custom")
82+
}

0 commit comments

Comments
 (0)