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 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}, + }, }, } }