Skip to content

Commit d1f2ccc

Browse files
committed
fix(s3-access-grants-grant): pass account id to delete input
1 parent de5feb2 commit d1f2ccc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

resources/s3-access-grants-grant.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func (l *S3AccessGrantsGrantLister) List(ctx context.Context, o interface{}) ([]
4848
for _, p := range res.AccessGrantsList {
4949
resources = append(resources, &S3AccessGrantsGrant{
5050
svc: svc,
51+
accountID: opts.AccountID,
5152
ID: p.AccessGrantId,
5253
GrantScope: p.GrantScope,
5354
GranteeType: ptr.String(string(p.Grantee.GranteeType)),
@@ -61,6 +62,7 @@ func (l *S3AccessGrantsGrantLister) List(ctx context.Context, o interface{}) ([]
6162

6263
type S3AccessGrantsGrant struct {
6364
svc *s3control.Client
65+
accountID *string
6466
ID *string `description:"The ID of the access grant."`
6567
GrantScope *string `description:"The scope of the access grant."`
6668
GranteeType *string `description:"The type of the grantee, (e.g. IAM)."`
@@ -70,6 +72,7 @@ type S3AccessGrantsGrant struct {
7072

7173
func (r *S3AccessGrantsGrant) Remove(ctx context.Context) error {
7274
_, err := r.svc.DeleteAccessGrant(ctx, &s3control.DeleteAccessGrantInput{
75+
AccountId: r.accountID,
7376
AccessGrantId: r.ID,
7477
})
7578
return err

0 commit comments

Comments
 (0)