Skip to content

Commit a026b98

Browse files
authored
feat(aws)!: Define primary key for s3_bucket_encryption_rules (#12408)
#### Summary This PR is aimed to address #12392 by creating a primary key (`bucket_arn`) on `aws_s3_bucket_encryption_rules` table.
1 parent 7d4a657 commit a026b98

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

plugins/source/aws/resources/services/s3/bucket_encryption_rules.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ func bucketEncryptionRules() *schema.Table {
2222
Columns: []schema.Column{
2323
client.DefaultAccountIDColumn(false),
2424
{
25-
Name: "bucket_arn",
26-
Type: arrow.BinaryTypes.String,
27-
Resolver: schema.ParentColumnResolver("arn"),
25+
Name: "bucket_arn",
26+
Type: arrow.BinaryTypes.String,
27+
Resolver: schema.ParentColumnResolver("arn"),
28+
PrimaryKey: true,
2829
},
2930
},
3031
}

website/tables/aws/aws_s3_bucket_encryption_rules.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This table shows data for S3 Bucket Encryption Rules.
44

55
https://docs.aws.amazon.com/AmazonS3/latest/API/API_ServerSideEncryptionRule.html
66

7-
The primary key for this table is **_cq_id**.
7+
The primary key for this table is **bucket_arn**.
88

99
## Relations
1010

@@ -14,10 +14,10 @@ This table depends on [aws_s3_buckets](aws_s3_buckets).
1414

1515
| Name | Type |
1616
| ------------- | ------------- |
17-
|_cq_id (PK)|`uuid`|
17+
|_cq_id|`uuid`|
1818
|_cq_parent_id|`uuid`|
1919
|account_id|`utf8`|
20-
|bucket_arn|`utf8`|
20+
|bucket_arn (PK)|`utf8`|
2121
|apply_server_side_encryption_by_default|`json`|
2222
|bucket_key_enabled|`bool`|
2323

0 commit comments

Comments
 (0)