Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

fix: Remove relation tables PK #921

Merged
merged 2 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion resources/services/accessanalyzer/analyzers.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ func Analyzers() *schema.Table {
Name: "aws_access_analyzer_analyzer_findings",
Description: "Contains information about a finding",
Resolver: fetchAccessAnalyzerAnalyzerFindings,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"analyzer_cq_id", "id"}},
Columns: []schema.Column{
{
Name: "analyzer_cq_id",
Expand Down
7 changes: 0 additions & 7 deletions resources/services/apigateway/rest_apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ func ApigatewayRestApis() *schema.Table {
Name: "aws_apigateway_rest_api_authorizers",
Description: "Represents an authorization layer for methods.",
Resolver: fetchApigatewayRestApiAuthorizers,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"rest_api_cq_id", "id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -206,7 +205,6 @@ func ApigatewayRestApis() *schema.Table {
Name: "aws_apigateway_rest_api_deployments",
Description: "An immutable representation of a RestApi resource that can be called by users using Stages.",
Resolver: fetchApigatewayRestApiDeployments,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"rest_api_cq_id", "id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -258,7 +256,6 @@ func ApigatewayRestApis() *schema.Table {
Name: "aws_apigateway_rest_api_documentation_parts",
Description: "A documentation part for a targeted API entity.",
Resolver: fetchApigatewayRestApiDocumentationParts,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"rest_api_cq_id", "id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -330,7 +327,6 @@ func ApigatewayRestApis() *schema.Table {
Name: "aws_apigateway_rest_api_documentation_versions",
Description: "A snapshot of the documentation of an API.",
Resolver: fetchApigatewayRestApiDocumentationVersions,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"rest_api_cq_id", "version"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -431,7 +427,6 @@ func ApigatewayRestApis() *schema.Table {
Name: "aws_apigateway_rest_api_models",
Description: "Represents the data structure of a method's request or response payload.",
Resolver: fetchApigatewayRestApiModels,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"rest_api_cq_id", "id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -493,7 +488,6 @@ func ApigatewayRestApis() *schema.Table {
Name: "aws_apigateway_rest_api_request_validators",
Description: "A set of validation rules for incoming Method requests.",
Resolver: fetchApigatewayRestApiRequestValidators,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"rest_api_cq_id", "id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -545,7 +539,6 @@ func ApigatewayRestApis() *schema.Table {
Name: "aws_apigateway_rest_api_resources",
Description: "Represents an API resource.",
Resolver: fetchApigatewayRestApiResources,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"rest_api_cq_id", "id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
2 changes: 0 additions & 2 deletions resources/services/apigateway/usage_plans.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ func ApigatewayUsagePlans() *schema.Table {
Name: "aws_apigateway_usage_plan_api_stages",
Description: "API stage name of the associated API stage in a usage plan.",
Resolver: fetchApigatewayUsagePlanApiStages,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"usage_plan_cq_id", "api_id", "stage"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -142,7 +141,6 @@ func ApigatewayUsagePlans() *schema.Table {
Name: "aws_apigateway_usage_plan_keys",
Description: "Represents a usage plan key to identify a plan customer.",
Resolver: fetchApigatewayUsagePlanKeys,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"usage_plan_cq_id", "id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
8 changes: 0 additions & 8 deletions resources/services/apigatewayv2/apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ func Apigatewayv2Apis() *schema.Table {
Name: "aws_apigatewayv2_api_authorizers",
Description: "Represents an authorizer.",
Resolver: fetchApigatewayv2ApiAuthorizers,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"api_cq_id", "authorizer_id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -267,7 +266,6 @@ func Apigatewayv2Apis() *schema.Table {
Name: "aws_apigatewayv2_api_deployments",
Description: "An immutable representation of an API that can be called by users.",
Resolver: fetchApigatewayv2ApiDeployments,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"api_cq_id", "deployment_id"}},
Columns: []schema.Column{
{
Name: "api_cq_id",
Expand Down Expand Up @@ -328,7 +326,6 @@ func Apigatewayv2Apis() *schema.Table {
Name: "aws_apigatewayv2_api_integrations",
Description: "Represents an integration.",
Resolver: fetchApigatewayv2ApiIntegrations,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"api_cq_id", "integration_id"}},
Columns: []schema.Column{
{
Name: "api_cq_id",
Expand Down Expand Up @@ -469,7 +466,6 @@ func Apigatewayv2Apis() *schema.Table {
Name: "aws_apigatewayv2_api_integration_responses",
Description: "Represents an integration response.",
Resolver: fetchApigatewayv2ApiIntegrationResponses,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"api_integration_cq_id", "integration_response_id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -533,7 +529,6 @@ func Apigatewayv2Apis() *schema.Table {
Name: "aws_apigatewayv2_api_models",
Description: "Represents a data model for an API.",
Resolver: fetchApigatewayv2ApiModels,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"api_cq_id", "model_id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -594,7 +589,6 @@ func Apigatewayv2Apis() *schema.Table {
Name: "aws_apigatewayv2_api_routes",
Description: "Represents a route.",
Resolver: fetchApigatewayv2ApiRoutes,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"api_cq_id", "route_id"}},
Columns: []schema.Column{
{
Name: "api_cq_id",
Expand Down Expand Up @@ -696,7 +690,6 @@ func Apigatewayv2Apis() *schema.Table {
Name: "aws_apigatewayv2_api_route_responses",
Description: "Represents a route response.",
Resolver: fetchApigatewayv2ApiRouteResponses,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"api_route_cq_id", "route_response_id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -755,7 +748,6 @@ func Apigatewayv2Apis() *schema.Table {
Name: "aws_apigatewayv2_api_stages",
Description: "Represents an API stage.",
Resolver: fetchApigatewayv2ApiStages,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"api_cq_id", "stage_name"}},
Columns: []schema.Column{
{
Name: "api_cq_id",
Expand Down
1 change: 0 additions & 1 deletion resources/services/apigatewayv2/domain_names.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ func Apigatewayv2DomainNames() *schema.Table {
Name: "aws_apigatewayv2_domain_name_rest_api_mappings",
Description: "Represents an API mapping.",
Resolver: fetchApigatewayv2DomainNameRestApiMappings,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"domain_name_cq_id", "api_mapping_id"}},
Columns: []schema.Column{
{
Name: "domain_name_cq_id",
Expand Down
1 change: 0 additions & 1 deletion resources/services/autoscaling/configurations.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ func AutoscalingLaunchConfigurations() *schema.Table {
Name: "aws_autoscaling_launch_configuration_block_device_mappings",
Description: "Describes a block device mapping.",
Resolver: fetchAutoscalingLaunchConfigurationBlockDeviceMappings,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"launch_configuration_cq_id", "device_name"}},
Columns: []schema.Column{
{
Name: "launch_configuration_cq_id",
Expand Down
1 change: 0 additions & 1 deletion resources/services/cloudwatch/alarms.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ func CloudwatchAlarms() *schema.Table {
Name: "aws_cloudwatch_alarm_metrics",
Description: "This structure is used in both GetMetricData and PutMetricAlarm.",
Resolver: fetchCloudwatchAlarmMetrics,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"alarm_cq_id", "id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
1 change: 0 additions & 1 deletion resources/services/cloudwatchlogs/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ func CloudwatchlogsFilters() *schema.Table {
Name: "aws_cloudwatchlogs_filter_metric_transformations",
Description: "Indicates how to transform ingested log events to metric data in a CloudWatch metric.",
Resolver: fetchCloudwatchlogsFilterMetricTransformations,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"filter_cq_id", "metric_name"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
1 change: 0 additions & 1 deletion resources/services/cognito/identity_pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ func CognitoIdentityPools() *schema.Table {
Name: "aws_cognito_identity_pool_cognito_identity_providers",
Description: "A provider representing an Amazon Cognito user pool and its client ID.",
Resolver: fetchCognitoIdentityPoolCognitoIdentityProviders,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"identity_pool_cq_id", "client_id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
2 changes: 0 additions & 2 deletions resources/services/cognito/user_pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ func CognitoUserPools() *schema.Table {
Name: "aws_cognito_user_pool_schema_attributes",
Description: "Contains information about the schema attribute.",
Resolver: fetchCognitoUserPoolSchemaAttributes,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"user_pool_cq_id", "name"}},
Columns: []schema.Column{
{
Name: "user_pool_cq_id",
Expand Down Expand Up @@ -517,7 +516,6 @@ func CognitoUserPools() *schema.Table {
Description: "A container for information about an identity provider.",
Resolver: fetchCognitoUserPoolIdentityProviders,
IgnoreError: client.IgnoreAccessDeniedServiceDisabled,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"user_pool_cq_id", "provider_name"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
1 change: 0 additions & 1 deletion resources/services/directconnect/connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ func DirectconnectConnections() *schema.Table {
Name: "aws_directconnect_connection_mac_sec_keys",
Description: "The MAC Security (MACsec) security keys associated with the connection.",
Resolver: fetchDirectconnectConnectionMacSecKeys,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"connection_cq_id", "secret_arn"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
1 change: 0 additions & 1 deletion resources/services/directconnect/gateways.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func DirectconnectGateways() *schema.Table {
Name: "aws_directconnect_gateway_associations",
Description: "Information about the association between an Direct Connect Gateway and either a Virtual Private Gateway, or Transit Gateway",
Resolver: fetchDirectconnectGatewayAssociations,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"gateway_cq_id", "association_id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
1 change: 0 additions & 1 deletion resources/services/directconnect/lags.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ func DirectconnectLags() *schema.Table {
Name: "aws_directconnect_lag_mac_sec_keys",
Description: "The MAC Security (MACsec) security keys associated with the LAG.",
Resolver: fetchDirectconnectLagMacSecKeys,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"lag_cq_id", "secret_arn"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
1 change: 0 additions & 1 deletion resources/services/directconnect/virtual_interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ func DirectconnectVirtualInterfaces() *schema.Table {
Name: "aws_directconnect_virtual_interface_bgp_peers",
Description: "Information about a BGP peer. ",
Resolver: fetchDirectconnectVirtualInterfaceBgpPeers,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"virtual_interface_cq_id", "bgp_peer_id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
1 change: 0 additions & 1 deletion resources/services/ec2/ebs_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func Ec2EbsVolumes() *schema.Table {
{
Name: "aws_ec2_ebs_volume_attachments",
Resolver: fetchEc2EbsVolumeAttachments,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"ebs_volume_cq_id", "device"}},
Columns: []schema.Column{
{
Name: "ebs_volume_cq_id",
Expand Down
1 change: 0 additions & 1 deletion resources/services/ec2/instance_statuses.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ func Ec2InstanceStatuses() *schema.Table {
Name: "aws_ec2_instance_status_events",
Description: "Any scheduled events associated with the instance.",
Resolver: fetchEc2InstanceStatusEvents,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"instance_status_cq_id", "id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
7 changes: 0 additions & 7 deletions resources/services/ec2/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ func Ec2Instances() *schema.Table {
Name: "aws_ec2_instance_block_device_mappings",
Description: "Describes a block device mapping.",
Resolver: fetchEc2InstanceBlockDeviceMappings,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"instance_cq_id", "ebs_volume_id"}},
Columns: []schema.Column{
{
Name: "instance_cq_id",
Expand Down Expand Up @@ -447,7 +446,6 @@ func Ec2Instances() *schema.Table {
Name: "aws_ec2_instance_elastic_gpu_associations",
Description: "Describes the association between an instance and an Elastic Graphics accelerator.",
Resolver: fetchEc2InstanceElasticGpuAssociations,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"instance_cq_id", "elastic_gpu_association_id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -482,7 +480,6 @@ func Ec2Instances() *schema.Table {
Name: "aws_ec2_instance_elastic_inference_accelerator_associations",
Description: "Describes the association between an instance and an elastic inference accelerator.",
Resolver: fetchEc2InstanceElasticInferenceAcceleratorAssociations,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"instance_cq_id", "elastic_inference_accelerator_association_id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -517,7 +514,6 @@ func Ec2Instances() *schema.Table {
Name: "aws_ec2_instance_network_interfaces",
Description: "Describes a network interface.",
Resolver: fetchEc2InstanceNetworkInterfaces,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"instance_cq_id", "network_interface_id"}},
Columns: []schema.Column{
{
Name: "instance_cq_id",
Expand Down Expand Up @@ -671,7 +667,6 @@ func Ec2Instances() *schema.Table {
Name: "aws_ec2_instance_network_interface_groups",
Description: "Describes a security group.",
Resolver: fetchEc2InstanceNetworkInterfaceGroups,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"instance_network_interface_cq_id", "group_id"}},
Columns: []schema.Column{
{
Name: "instance_network_interface_cq_id",
Expand Down Expand Up @@ -779,7 +774,6 @@ func Ec2Instances() *schema.Table {
Name: "aws_ec2_instance_product_codes",
Description: "Describes a product code.",
Resolver: fetchEc2InstanceProductCodes,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"instance_cq_id", "product_code_id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand All @@ -804,7 +798,6 @@ func Ec2Instances() *schema.Table {
Name: "aws_ec2_instance_security_groups",
Description: "Describes a security group.",
Resolver: fetchEc2InstanceSecurityGroups,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"instance_cq_id", "group_id"}},
Columns: []schema.Column{
{
Name: "instance_cq_id",
Expand Down
1 change: 0 additions & 1 deletion resources/services/ec2/internet_gateways.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func Ec2InternetGateways() *schema.Table {
Name: "aws_ec2_internet_gateway_attachments",
Description: "Describes the attachment of a VPC to an internet gateway or an egress-only internet gateway.",
Resolver: fetchEc2InternetGatewayAttachments,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"internet_gateway_cq_id", "vpc_id"}},
Columns: []schema.Column{
{
Name: "internet_gateway_cq_id",
Expand Down
1 change: 0 additions & 1 deletion resources/services/ec2/nat_gateways.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ func Ec2NatGateways() *schema.Table {
Name: "aws_ec2_nat_gateway_addresses",
Description: "Describes the IP addresses and network interface associated with a NAT gateway.",
Resolver: fetchEc2NatGatewayAddresses,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"nat_gateway_cq_id", "network_interface_id"}},
Columns: []schema.Column{
{
Name: "nat_gateway_cq_id",
Expand Down
2 changes: 0 additions & 2 deletions resources/services/ec2/network_acls.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ func Ec2NetworkAcls() *schema.Table {
Name: "aws_ec2_network_acl_associations",
Description: "Describes an association between a network ACL and a subnet.",
Resolver: fetchEc2NetworkAclAssociations,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"network_acl_cq_id", "network_acl_association_id"}},
Columns: []schema.Column{
{
Name: "network_acl_cq_id",
Expand All @@ -98,7 +97,6 @@ func Ec2NetworkAcls() *schema.Table {
Name: "aws_ec2_network_acl_entries",
Description: "Describes an entry in a network ACL.",
Resolver: fetchEc2NetworkAclEntries,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"network_acl_cq_id", "egress", "rule_number"}},
Columns: []schema.Column{
{
Name: "network_acl_cq_id",
Expand Down
2 changes: 0 additions & 2 deletions resources/services/ec2/route_tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func Ec2RouteTables() *schema.Table {
Name: "aws_ec2_route_table_associations",
Description: "Describes an association between a route table and a subnet or gateway.",
Resolver: fetchEc2RouteTableAssociations,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"route_table_cq_id", "id"}},
Columns: []schema.Column{
{
Name: "route_table_cq_id",
Expand Down Expand Up @@ -118,7 +117,6 @@ func Ec2RouteTables() *schema.Table {
Name: "aws_ec2_route_table_propagating_vgws",
Description: "Describes a virtual private gateway propagating route.",
Resolver: fetchEc2RouteTablePropagatingVgws,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"route_table_cq_id", "gateway_id"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
1 change: 0 additions & 1 deletion resources/services/ec2/subnets.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ func Ec2Subnets() *schema.Table {
Name: "aws_ec2_subnet_ipv6_cidr_block_association_sets",
Description: "Describes an IPv6 CIDR block associated with a subnet.",
Resolver: fetchEc2SubnetIpv6CidrBlockAssociationSets,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"subnet_cq_id", "ipv6_cidr_block"}},
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down
Loading