From bbadd9429ef7d9782ace159e7853272ebc5fd742 Mon Sep 17 00:00:00 2001 From: bbernays Date: Wed, 8 Feb 2023 09:30:23 -0500 Subject: [PATCH 1/2] Update aws_s3_bucket_grants.md --- plugins/source/aws/docs/tables/aws_s3_bucket_grants.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/source/aws/docs/tables/aws_s3_bucket_grants.md b/plugins/source/aws/docs/tables/aws_s3_bucket_grants.md index 42bce16948c256..0c4b2b168372b1 100644 --- a/plugins/source/aws/docs/tables/aws_s3_bucket_grants.md +++ b/plugins/source/aws/docs/tables/aws_s3_bucket_grants.md @@ -2,7 +2,7 @@ https://docs.aws.amazon.com/AmazonS3/latest/API/API_Grant.html -The composite primary key for this table is (**bucket_arn**, **grantee_type**, **grantee_id**). +The composite primary key for this table is (**bucket_arn**, **grantee_type**, **grantee_id**, **permission**). ## Relations @@ -20,5 +20,5 @@ This table depends on [aws_s3_buckets](aws_s3_buckets.md). |bucket_arn (PK)|String| |grantee_type (PK)|String| |grantee_id (PK)|String| -|grantee|JSON| -|permission|String| \ No newline at end of file +|permission (PK)|String| +|grantee|JSON| \ No newline at end of file From 4f5207ecc36febafb6e4c575bdc8cffce93f8ac7 Mon Sep 17 00:00:00 2001 From: bbernays Date: Wed, 8 Feb 2023 09:30:26 -0500 Subject: [PATCH 2/2] Update bucket_grants.go --- plugins/source/aws/resources/services/s3/bucket_grants.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/source/aws/resources/services/s3/bucket_grants.go b/plugins/source/aws/resources/services/s3/bucket_grants.go index 0146050e22f3b5..a9bb5e0cd82828 100644 --- a/plugins/source/aws/resources/services/s3/bucket_grants.go +++ b/plugins/source/aws/resources/services/s3/bucket_grants.go @@ -37,6 +37,12 @@ func BucketGrants() *schema.Table { Resolver: resolveBucketGranteeID, CreationOptions: schema.ColumnCreationOptions{PrimaryKey: true}, }, + { + Name: "permission", + Type: schema.TypeString, + Resolver: schema.PathResolver("Permission"), + CreationOptions: schema.ColumnCreationOptions{PrimaryKey: true}, + }, }, } }