Skip to content

Commit

Permalink
fix(aws)!: Add arn to aws_ec2_managed_prefix_lists PK (#8119)
Browse files Browse the repository at this point in the history
  • Loading branch information
candiduslynx committed Feb 15, 2023
1 parent 74955f4 commit 148b06c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ManagedPrefixList.html.
The 'request_account_id' and 'request_region' columns are added to show the account_id and region of where the request was made from.

The composite primary key for this table is (**request_account_id**, **request_region**).
The composite primary key for this table is (**request_account_id**, **request_region**, **arn**).

## Columns

Expand All @@ -15,7 +15,7 @@ The composite primary key for this table is (**request_account_id**, **request_r
|_cq_parent_id|UUID|
|request_account_id (PK)|String|
|request_region (PK)|String|
|arn|String|
|arn (PK)|String|
|tags|JSON|
|address_family|String|
|max_entries|Int|
Expand Down
27 changes: 12 additions & 15 deletions plugins/source/aws/resources/services/ec2/managed_prefix_lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,22 @@ The 'request_account_id' and 'request_region' columns are added to show the acco
Transform: transformers.TransformWithStruct(&types.ManagedPrefixList{}),
Columns: []schema.Column{
{
Name: "request_account_id",
Type: schema.TypeString,
Resolver: client.ResolveAWSAccount,
CreationOptions: schema.ColumnCreationOptions{
PrimaryKey: true,
},
Name: "request_account_id",
Type: schema.TypeString,
Resolver: client.ResolveAWSAccount,
CreationOptions: schema.ColumnCreationOptions{PrimaryKey: true},
},
{
Name: "request_region",
Type: schema.TypeString,
Resolver: client.ResolveAWSRegion,
CreationOptions: schema.ColumnCreationOptions{
PrimaryKey: true,
},
Name: "request_region",
Type: schema.TypeString,
Resolver: client.ResolveAWSRegion,
CreationOptions: schema.ColumnCreationOptions{PrimaryKey: true},
},
{
Name: "arn",
Type: schema.TypeString,
Resolver: schema.PathResolver("PrefixListArn"),
Name: "arn",
Type: schema.TypeString,
Resolver: schema.PathResolver("PrefixListArn"),
CreationOptions: schema.ColumnCreationOptions{PrimaryKey: true},
},
{
Name: "tags",
Expand Down

0 comments on commit 148b06c

Please sign in to comment.