Skip to content

Commit 41362e2

Browse files
authored
fix: Add id to aws_cloudfront_cache_policies, region to aws_ec2_transit_gateways (#3444)
Adds columns to two tables that were missing them before. Also removes the PK constraint on the id column of `transit_gateways`: ARN should suffice.
1 parent e94e56f commit 41362e2

File tree

7 files changed

+20
-8
lines changed

7 files changed

+20
-8
lines changed
File renamed without changes.

plugins/source/aws/codegen/recipes/cloudfront.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ func CloudfrontResources() []*Resource {
1616
ExtraColumns: append(
1717
defaultAccountColumns,
1818
[]codegen.ColumnDefinition{
19-
19+
{
20+
Name: "id",
21+
Type: schema.TypeString,
22+
Resolver: `schema.PathResolver("CachePolicy.Id")`,
23+
},
2024
{
2125
Name: "arn",
2226
Type: schema.TypeString,

plugins/source/aws/codegen/recipes/ec2.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ func EC2Resources() []*Resource {
400400
Struct: &types.TransitGateway{},
401401
Description: "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TransitGateway.html",
402402
SkipFields: []string{"Tags", "TransitGatewayId", "TransitGatewayArn"},
403-
ExtraColumns: append(defaultAccountColumns,
403+
ExtraColumns: append(defaultRegionalColumns,
404404
[]codegen.ColumnDefinition{
405405
{
406406
Name: "tags",
@@ -411,7 +411,6 @@ func EC2Resources() []*Resource {
411411
Name: "id",
412412
Type: schema.TypeString,
413413
Resolver: `schema.PathResolver("TransitGatewayId")`,
414-
Options: schema.ColumnCreationOptions{PrimaryKey: true},
415414
},
416415
{
417416
Name: "arn",

plugins/source/aws/docs/tables/aws_cloudfront_cache_policies.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The primary key for this table is **_cq_id**.
1313
|_cq_id (PK)|UUID|
1414
|_cq_parent_id|UUID|
1515
|account_id|String|
16+
|id|String|
1617
|arn|String|
1718
|cache_policy|JSON|
1819
|type|String|

plugins/source/aws/docs/tables/aws_ec2_transit_gateways.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TransitGateway.html
44

5-
The composite primary key for this table is (**id**, **arn**).
5+
The primary key for this table is **arn**.
66

77
## Relations
88
The following tables depend on aws_ec2_transit_gateways:
@@ -20,8 +20,9 @@ The following tables depend on aws_ec2_transit_gateways:
2020
|_cq_id|UUID|
2121
|_cq_parent_id|UUID|
2222
|account_id|String|
23+
|region|String|
2324
|tags|JSON|
24-
|id (PK)|String|
25+
|id|String|
2526
|arn (PK)|String|
2627
|creation_time|Timestamp|
2728
|description|String|

plugins/source/aws/resources/services/cloudfront/cache_policies.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/source/aws/resources/services/ec2/transit_gateways.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)