Skip to content

Commit 494992b

Browse files
candiduslynxpull[bot]
authored andcommitted
fix(aws)!: Add parent table ARNs as PKs to child tables for aws_resiliencehub_* tables (#7978)
closes https://github.com/cloudquery/cloudquery-issues/issues/497 BEGIN_COMMIT_OVERRIDE fix(aws): Add parent table ARNs as PKs to child tables for `aws_resiliencehub_*` resources BREAKING-CHANGE: Add parent table ARNs as PKs to child tables for `aws_resiliencehub_*` resources fix(aws): Remove `account_id` and `region` columns from `aws_resiliencehub_*` PKs BREAKING-CHANGE: Remove `account_id` and `region` columns from `aws_resiliencehub_*` PKs fix(aws): Use `physical_resource_identifier` instead of `physical_resource_id` in `aws_resiliencehub_app_version_resources` and `aws_resiliencehub_app_version_resource_mappings` PKs BREAKING-CHANGE: Use `physical_resource_identifier` instead of `physical_resource_id` in `aws_resiliencehub_app_version_resources` and `aws_resiliencehub_app_version_resource_mappings` PKs END_COMMIT_OVERRIDE
1 parent b4a94a1 commit 494992b

26 files changed

Lines changed: 133 additions & 131 deletions

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

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

33
https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_AlarmRecommendation.html
44

5-
The composite primary key for this table is (**account_id**, **region**, **name**).
5+
The composite primary key for this table is (**app_arn**, **assessment_arn**, **recommendation_id**).
66

77
## Relations
88

@@ -16,10 +16,12 @@ This table depends on [aws_resiliencehub_app_assessments](aws_resiliencehub_app_
1616
|_cq_sync_time|Timestamp|
1717
|_cq_id|UUID|
1818
|_cq_parent_id|UUID|
19-
|account_id (PK)|String|
20-
|region (PK)|String|
21-
|name (PK)|String|
22-
|recommendation_id|String|
19+
|account_id|String|
20+
|region|String|
21+
|app_arn (PK)|String|
22+
|assessment_arn (PK)|String|
23+
|name|String|
24+
|recommendation_id (PK)|String|
2325
|reference_id|String|
2426
|type|String|
2527
|app_component_name|String|

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

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

33
https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_AppAssessment.html
44

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

77
## Relations
88

@@ -26,11 +26,11 @@ The following tables depend on aws_resiliencehub_app_assessments:
2626
|_cq_parent_id|UUID|
2727
|account_id|String|
2828
|region|String|
29+
|app_arn (PK)|String|
2930
|arn (PK)|String|
3031
|assessment_arn|String|
3132
|assessment_status|String|
3233
|invoker|String|
33-
|app_arn|String|
3434
|app_version|String|
3535
|assessment_name|String|
3636
|compliance|JSON|

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

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

33
https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_AppComponentCompliance.html
44

5-
The composite primary key for this table is (**account_id**, **region**, **app_component_name**).
5+
The composite primary key for this table is (**app_arn**, **assessment_arn**, **app_component_name**).
66

77
## Relations
88

@@ -16,8 +16,10 @@ This table depends on [aws_resiliencehub_app_assessments](aws_resiliencehub_app_
1616
|_cq_sync_time|Timestamp|
1717
|_cq_id|UUID|
1818
|_cq_parent_id|UUID|
19-
|account_id (PK)|String|
20-
|region (PK)|String|
19+
|account_id|String|
20+
|region|String|
21+
|app_arn (PK)|String|
22+
|assessment_arn (PK)|String|
2123
|app_component_name (PK)|String|
2224
|compliance|JSON|
2325
|cost|JSON|

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

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

33
https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_ResourceMapping.html
44

5-
The composite primary key for this table is (**account_id**, **region**, **physical_resource_id**).
5+
The composite primary key for this table is (**app_arn**, **app_version**, **physical_resource_identifier**).
66

77
## Relations
88

@@ -16,10 +16,13 @@ This table depends on [aws_resiliencehub_app_versions](aws_resiliencehub_app_ver
1616
|_cq_sync_time|Timestamp|
1717
|_cq_id|UUID|
1818
|_cq_parent_id|UUID|
19-
|account_id (PK)|String|
20-
|region (PK)|String|
19+
|account_id|String|
20+
|region|String|
21+
|app_arn (PK)|String|
22+
|app_version (PK)|String|
23+
|physical_resource_identifier (PK)|String|
2124
|mapping_type|String|
22-
|physical_resource_id (PK)|JSON|
25+
|physical_resource_id|JSON|
2326
|app_registry_app_name|String|
2427
|logical_stack_name|String|
2528
|resource_group_name|String|

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

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

33
https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_PhysicalResource.html
44

5-
The composite primary key for this table is (**account_id**, **region**, **physical_resource_id**).
5+
The composite primary key for this table is (**app_arn**, **app_version**, **physical_resource_identifier**).
66

77
## Relations
88

@@ -16,10 +16,13 @@ This table depends on [aws_resiliencehub_app_versions](aws_resiliencehub_app_ver
1616
|_cq_sync_time|Timestamp|
1717
|_cq_id|UUID|
1818
|_cq_parent_id|UUID|
19-
|account_id (PK)|String|
20-
|region (PK)|String|
19+
|account_id|String|
20+
|region|String|
21+
|app_arn (PK)|String|
22+
|app_version (PK)|String|
23+
|physical_resource_identifier (PK)|String|
2124
|logical_resource_id|JSON|
22-
|physical_resource_id (PK)|JSON|
25+
|physical_resource_id|JSON|
2326
|resource_type|String|
2427
|app_components|JSON|
2528
|resource_name|String|

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

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

33
https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_AppVersionSummary.html
44

5-
The composite primary key for this table is (**account_id**, **region**, **app_version**).
5+
The composite primary key for this table is (**app_arn**, **app_version**).
66

77
## Relations
88

@@ -20,6 +20,7 @@ The following tables depend on aws_resiliencehub_app_versions:
2020
|_cq_sync_time|Timestamp|
2121
|_cq_id|UUID|
2222
|_cq_parent_id|UUID|
23-
|account_id (PK)|String|
24-
|region (PK)|String|
23+
|account_id|String|
24+
|region|String|
25+
|app_arn (PK)|String|
2526
|app_version (PK)|String|

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

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

33
https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_ComponentRecommendation.html
44

5-
The composite primary key for this table is (**account_id**, **region**, **app_component_name**).
5+
The composite primary key for this table is (**app_arn**, **assessment_arn**, **app_component_name**).
66

77
## Relations
88

@@ -16,8 +16,10 @@ This table depends on [aws_resiliencehub_app_assessments](aws_resiliencehub_app_
1616
|_cq_sync_time|Timestamp|
1717
|_cq_id|UUID|
1818
|_cq_parent_id|UUID|
19-
|account_id (PK)|String|
20-
|region (PK)|String|
19+
|account_id|String|
20+
|region|String|
21+
|app_arn (PK)|String|
22+
|assessment_arn (PK)|String|
2123
|app_component_name (PK)|String|
2224
|config_recommendations|JSON|
2325
|recommendation_status|String|

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

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

33
https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_RecommendationTemplate.html
44

5-
The composite primary key for this table is (**account_id**, **region**, **name**).
5+
The composite primary key for this table is (**arn**, **assessment_arn**, **app_arn**).
66

77
## Relations
88

@@ -16,15 +16,16 @@ This table depends on [aws_resiliencehub_app_assessments](aws_resiliencehub_app_
1616
|_cq_sync_time|Timestamp|
1717
|_cq_id|UUID|
1818
|_cq_parent_id|UUID|
19-
|account_id (PK)|String|
20-
|region (PK)|String|
21-
|assessment_arn|String|
19+
|account_id|String|
20+
|region|String|
21+
|arn (PK)|String|
22+
|assessment_arn (PK)|String|
2223
|format|String|
23-
|name (PK)|String|
24+
|name|String|
2425
|recommendation_template_arn|String|
2526
|recommendation_types|StringArray|
2627
|status|String|
27-
|app_arn|String|
28+
|app_arn (PK)|String|
2829
|end_time|Timestamp|
2930
|message|String|
3031
|needs_replacements|Bool|

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

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

33
https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_SopRecommendation.html
44

5-
The composite primary key for this table is (**account_id**, **region**, **recommendation_id**).
5+
The composite primary key for this table is (**app_arn**, **assessment_arn**, **recommendation_id**).
66

77
## Relations
88

@@ -16,8 +16,10 @@ This table depends on [aws_resiliencehub_app_assessments](aws_resiliencehub_app_
1616
|_cq_sync_time|Timestamp|
1717
|_cq_id|UUID|
1818
|_cq_parent_id|UUID|
19-
|account_id (PK)|String|
20-
|region (PK)|String|
19+
|account_id|String|
20+
|region|String|
21+
|app_arn (PK)|String|
22+
|assessment_arn (PK)|String|
2123
|recommendation_id (PK)|String|
2224
|reference_id|String|
2325
|service_type|String|

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

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

33
https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_TestRecommendation.html
44

5-
The composite primary key for this table is (**account_id**, **region**, **reference_id**).
5+
The composite primary key for this table is (**app_arn**, **assessment_arn**, **recommendation_id**).
66

77
## Relations
88

@@ -16,16 +16,18 @@ This table depends on [aws_resiliencehub_app_assessments](aws_resiliencehub_app_
1616
|_cq_sync_time|Timestamp|
1717
|_cq_id|UUID|
1818
|_cq_parent_id|UUID|
19-
|account_id (PK)|String|
20-
|region (PK)|String|
21-
|reference_id (PK)|String|
19+
|account_id|String|
20+
|region|String|
21+
|app_arn (PK)|String|
22+
|assessment_arn (PK)|String|
23+
|reference_id|String|
2224
|app_component_name|String|
2325
|depends_on_alarms|StringArray|
2426
|description|String|
2527
|intent|String|
2628
|items|JSON|
2729
|name|String|
2830
|prerequisite|String|
29-
|recommendation_id|String|
31+
|recommendation_id (PK)|String|
3032
|risk|String|
3133
|type|String|

0 commit comments

Comments
 (0)