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

Add missing tags #191

Merged
merged 34 commits into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a7fdcee
some resources now have tags
amanenk Sep 8, 2021
156188e
added more resources
amanenk Sep 8, 2021
0e9c316
cloudfront distributions added
amanenk Sep 9, 2021
dfd847e
kms keys tags added
amanenk Sep 9, 2021
ae59803
cloudtrail tags added
amanenk Sep 10, 2021
6d341f6
some more resources added
amanenk Sep 10, 2021
5480bf6
resolvers fixes
amanenk Sep 10, 2021
7432a9c
vpclinks migrations
amanenk Sep 10, 2021
bdcb635
final renamings
amanenk Sep 20, 2021
65f7f94
more renamings
amanenk Sep 20, 2021
5f851c8
more renamings
amanenk Sep 20, 2021
147f438
more renamings
amanenk Sep 20, 2021
a3f83a0
more renamings
amanenk Sep 20, 2021
3591ddc
migration finalization
amanenk Sep 21, 2021
e32de30
changelog adjusted
amanenk Sep 21, 2021
501b1b4
Merge branch 'main' into add_missing_tags
amanenk Sep 21, 2021
eec6123
linter fix
amanenk Sep 21, 2021
dcb841b
linter fix
amanenk Sep 21, 2021
2345f10
docs generated
amanenk Sep 21, 2021
5c6e7f3
docs generated
amanenk Sep 21, 2021
fe57805
docs generated
amanenk Sep 21, 2021
9552bde
tests fixed
amanenk Sep 21, 2021
a4ed1c9
migration fixes
amanenk Sep 21, 2021
e3646eb
cloudfront distivutions reverted
amanenk Oct 7, 2021
261a2f9
migrations fixes
amanenk Oct 7, 2021
cd742c5
cloudtrail tags fetch optimized
amanenk Oct 7, 2021
7e8e5fc
Merge branch 'main' into add_missing_tags
amanenk Oct 11, 2021
6dd1b3b
changelog adjusted
amanenk Oct 14, 2021
c6255d3
Merge branch 'main' into add_missing_tags
roneli Oct 19, 2021
08dbf77
Merge branch 'main' into add_missing_tags
amanenk Oct 19, 2021
d499eab
migration version adjusted
amanenk Oct 19, 2021
b1a2779
Merge remote-tracking branch 'origin/add_missing_tags' into add_missi…
amanenk Oct 19, 2021
4a834cf
changelog adjusted
amanenk Oct 19, 2021
707312c
Merge branch 'main' into add_missing_tags
roneli Oct 19, 2021
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this provider will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] - 2021-09-21
###### SDK Version: 0.4.9

### :spider: Fixed
* Fixed [empty or missing](https://github.com/cloudquery/cq-provider-aws/issues/157) tags on some resources [#191](https://github.com/cloudquery/cq-provider-aws/pull/191)
* Fixed duplicate of `id` field for `aws_apigatewayv2_vpc_links` - removed `vpc_link_id` field
* Fixed duplicate of `region` field for `aws_cloudtrail_trails` - removed `home_region` field
* Fixed naming according to convention `environment_name` -> `name`, `key_id` -> `id`
amanenk marked this conversation as resolved.
Show resolved Hide resolved

## [v0.5.16] - 2021-10-07
###### SDK Version: v0.4.9

Expand Down Expand Up @@ -38,6 +47,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### :spider: Fixed
remove region multiplex on web acl resource[#188](https://github.com/cloudquery/cq-provider-aws/pull/188)



## [v0.5.12] - 2021-09-09
###### SDK Version: v0.4.3

Expand Down
9 changes: 9 additions & 0 deletions client/mocks/builders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,13 @@ func buildKmsKeys(t *testing.T, ctrl *gomock.Controller) client.Services {
t.Fatal(err)
}

tags := kms.ListResourceTagsOutput{}
err = faker.FakeData(&tags)
if err != nil {
t.Fatal(err)
}
tags.NextMarker = nil

m.EXPECT().ListKeys(gomock.Any(), gomock.Any(), gomock.Any()).Return(
&kms.ListKeysOutput{
Keys: []kmsTypes.KeyListEntry{k},
Expand All @@ -793,6 +800,8 @@ func buildKmsKeys(t *testing.T, ctrl *gomock.Controller) client.Services {
&km, nil)
m.EXPECT().GetKeyRotationStatus(gomock.Any(), gomock.Any(), gomock.Any()).Return(
&krs, nil)
m.EXPECT().ListResourceTags(gomock.Any(), gomock.Any(), gomock.Any()).Return(
&tags, nil)
return client.Services{
KMS: m,
}
Expand Down
20 changes: 20 additions & 0 deletions client/mocks/mock_apigatewayv2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions client/mocks/mock_cloudfront.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions client/mocks/mock_cloudtrail.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions client/mocks/mock_ecs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions client/mocks/mock_elasticbeanstalk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions client/mocks/mock_elasticsearch.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions client/mocks/mock_elbv2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions client/mocks/mock_kms.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions client/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,22 @@ type Apigatewayv2Client interface {
GetStages(ctx context.Context, params *apigatewayv2.GetStagesInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.GetStagesOutput, error)
GetVpcLinks(ctx context.Context, params *apigatewayv2.GetVpcLinksInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.GetVpcLinksOutput, error)
GetDomainNames(ctx context.Context, params *apigatewayv2.GetDomainNamesInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.GetDomainNamesOutput, error)
GetTags(ctx context.Context, params *apigatewayv2.GetTagsInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.GetTagsOutput, error)
}

//go:generate mockgen -package=mocks -destination=./mocks/mock_cloudfront.go . CloudfrontClient
type CloudfrontClient interface {
ListDistributions(ctx context.Context, params *cloudfront.ListDistributionsInput, optFns ...func(*cloudfront.Options)) (*cloudfront.ListDistributionsOutput, error)
ListCachePolicies(ctx context.Context, params *cloudfront.ListCachePoliciesInput, optFns ...func(*cloudfront.Options)) (*cloudfront.ListCachePoliciesOutput, error)
ListTagsForResource(ctx context.Context, params *cloudfront.ListTagsForResourceInput, optFns ...func(*cloudfront.Options)) (*cloudfront.ListTagsForResourceOutput, error)
}

//go:generate mockgen -package=mocks -destination=./mocks/mock_cloudtrail.go . CloudtrailClient
type CloudtrailClient interface {
GetEventSelectors(ctx context.Context, params *cloudtrail.GetEventSelectorsInput, optFns ...func(*cloudtrail.Options)) (*cloudtrail.GetEventSelectorsOutput, error)
DescribeTrails(ctx context.Context, params *cloudtrail.DescribeTrailsInput, optFns ...func(*cloudtrail.Options)) (*cloudtrail.DescribeTrailsOutput, error)
GetTrailStatus(ctx context.Context, params *cloudtrail.GetTrailStatusInput, optFns ...func(*cloudtrail.Options)) (*cloudtrail.GetTrailStatusOutput, error)
ListTags(ctx context.Context, params *cloudtrail.ListTagsInput, optFns ...func(*cloudtrail.Options)) (*cloudtrail.ListTagsOutput, error)
}

//go:generate mockgen -package=mocks -destination=./mocks/mock_cloudwatch.go . CloudwatchClient
Expand Down Expand Up @@ -181,13 +184,15 @@ type EfsClient interface {
//go:generate mockgen -package=mocks -destination=./mocks/mock_elasticbeanstalk.go . ElasticbeanstalkClient
type ElasticbeanstalkClient interface {
DescribeEnvironments(ctx context.Context, params *elasticbeanstalk.DescribeEnvironmentsInput, optFns ...func(*elasticbeanstalk.Options)) (*elasticbeanstalk.DescribeEnvironmentsOutput, error)
ListTagsForResource(ctx context.Context, params *elasticbeanstalk.ListTagsForResourceInput, optFns ...func(*elasticbeanstalk.Options)) (*elasticbeanstalk.ListTagsForResourceOutput, error)
}

//go:generate mockgen -package=mocks -destination=./mocks/mock_elbv2.go . ElbV2Client
type ElbV2Client interface {
DescribeLoadBalancers(ctx context.Context, params *elbv2.DescribeLoadBalancersInput, optFns ...func(*elbv2.Options)) (*elbv2.DescribeLoadBalancersOutput, error)
DescribeLoadBalancerAttributes(ctx context.Context, params *elbv2.DescribeLoadBalancerAttributesInput, optFns ...func(*elbv2.Options)) (*elbv2.DescribeLoadBalancerAttributesOutput, error)
DescribeTargetGroups(ctx context.Context, params *elbv2.DescribeTargetGroupsInput, optFns ...func(*elbv2.Options)) (*elbv2.DescribeTargetGroupsOutput, error)
DescribeTags(ctx context.Context, params *elbv2.DescribeTagsInput, optFns ...func(*elbv2.Options)) (*elbv2.DescribeTagsOutput, error)
}

//go:generate mockgen -package=mocks -destination=./mocks/mock_elbv1.go . ElbV1Client
Expand Down Expand Up @@ -248,6 +253,7 @@ type KmsClient interface {
ListKeys(ctx context.Context, params *kms.ListKeysInput, optFns ...func(*kms.Options)) (*kms.ListKeysOutput, error)
DescribeKey(ctx context.Context, params *kms.DescribeKeyInput, optFns ...func(*kms.Options)) (*kms.DescribeKeyOutput, error)
GetKeyRotationStatus(ctx context.Context, params *kms.GetKeyRotationStatusInput, optFns ...func(*kms.Options)) (*kms.GetKeyRotationStatusOutput, error)
ListResourceTags(ctx context.Context, params *kms.ListResourceTagsInput, optFns ...func(*kms.Options)) (*kms.ListResourceTagsOutput, error)
}

//go:generate mockgen -package=mocks -destination=./mocks/mock_mq.go . MQClient
Expand Down Expand Up @@ -298,12 +304,14 @@ type SnsClient interface {
type EcsClient interface {
DescribeClusters(ctx context.Context, params *ecs.DescribeClustersInput, optFns ...func(*ecs.Options)) (*ecs.DescribeClustersOutput, error)
ListClusters(ctx context.Context, params *ecs.ListClustersInput, optFns ...func(*ecs.Options)) (*ecs.ListClustersOutput, error)
ListTagsForResource(ctx context.Context, params *ecs.ListTagsForResourceInput, optFns ...func(*ecs.Options)) (*ecs.ListTagsForResourceOutput, error)
}

//go:generate mockgen -package=mocks -destination=./mocks/mock_elasticsearch.go . ElasticSearch
type ElasticSearch interface {
ListDomainNames(ctx context.Context, params *elasticsearchservice.ListDomainNamesInput, optFns ...func(*elasticsearchservice.Options)) (*elasticsearchservice.ListDomainNamesOutput, error)
DescribeElasticsearchDomain(ctx context.Context, params *elasticsearchservice.DescribeElasticsearchDomainInput, optFns ...func(*elasticsearchservice.Options)) (*elasticsearchservice.DescribeElasticsearchDomainOutput, error)
ListTags(ctx context.Context, params *elasticsearchservice.ListTagsInput, optFns ...func(*elasticsearchservice.Options)) (*elasticsearchservice.ListTagsOutput, error)
}

//go:generate mockgen -package=mocks -destination=./mocks/mock_eks.go . EksClient
Expand Down
3 changes: 1 addition & 2 deletions docs/tables/aws_apigatewayv2_vpc_links.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ Represents a VPC link.
| ------------- | ------------- | ----- |
|account_id|text|The AWS Account ID of the resource.|
|region|text|The AWS Region of the resource.|
|id|text|The ID of the VPC link.|
|name|text|The name of the VPC link.|
|security_group_ids|text[]|A list of security group IDs for the VPC link.|
|subnet_ids|text[]|A list of subnet IDs to include in the VPC link.|
|vpc_link_id|text|The ID of the VPC link. (original field name)|
|id|text|The ID of the VPC link.|
|created_date|timestamp without time zone|The timestamp when the VPC link was created.|
|tags|jsonb|Tags for the VPC link.|
|vpc_link_status|text|The status of the VPC link.|
Expand Down
10 changes: 5 additions & 5 deletions docs/tables/aws_cloudtrail_trail_event_selectors.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

# Table: aws_cloudtrail_trail_event_selectors
Use event selectors to further specify the management and data event settings for your trail.
Use event selectors to further specify the management and data event settings for your trail
## Columns
| Name | Type | Description |
| ------------- | ------------- | ----- |
|trail_cq_id|uuid|Unique CloudQuery ID of aws_cloudtrail_trails table (FK)|
|trail_arn|text|Specifies the ARN of the trail.|
|exclude_management_event_sources|text[]|An optional list of service event sources from which you do not want management events to be logged on your trail.|
|include_management_events|boolean|Specify if you want your event selector to include management events for your trail.|
|read_write_type|text|Specify if you want your trail to log read-only events, write-only events, or all.|
|trail_arn|text|Specifies the ARN of the trail|
|exclude_management_event_sources|text[]|An optional list of service event sources from which you do not want management events to be logged on your trail|
|include_management_events|boolean|Specify if you want your event selector to include management events for your trail|
|read_write_type|text|Specify if you want your trail to log read-only events, write-only events, or all|
Loading