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

Bugfix/remove relation multiplexes #168

Merged
merged 1 commit into from
Aug 25, 2021
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/waf v1.2.1
github.com/aws/aws-sdk-go-v2/service/wafv2 v1.5.1
github.com/aws/smithy-go v1.4.0
github.com/cloudquery/cq-provider-sdk v0.3.3
github.com/cloudquery/cq-provider-sdk v0.3.4
github.com/cloudquery/faker/v3 v3.7.4
github.com/gocarina/gocsv v0.0.0-20210516172204-ca9e8a8ddea8
github.com/golang/mock v1.5.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
github.com/cloudquery/cq-provider-sdk v0.3.3 h1:rlpR/xpSR4FQ9TagRSg5N/hi63C3WaThqJiwHfR47bc=
github.com/cloudquery/cq-provider-sdk v0.3.3/go.mod h1:7SXwJnJzLTmV6UqqBaBiBEyjUp2jM1opxePsTZIl+oU=
github.com/cloudquery/cq-provider-sdk v0.3.4 h1:kLzkr/fIa7fIVzwN1OXckBPpX28TMDpW3h6UewJONgU=
github.com/cloudquery/cq-provider-sdk v0.3.4/go.mod h1:7SXwJnJzLTmV6UqqBaBiBEyjUp2jM1opxePsTZIl+oU=
github.com/cloudquery/faker/v3 v3.7.4 h1:cCcU3r0yHpS0gqKj9rRKAGS0/hY33fBxbqCNFtDD4ec=
github.com/cloudquery/faker/v3 v3.7.4/go.mod h1:1b8WVG9Gh0T2hVo1a8dWeXfu0AhqSB6J/mmJaesqOeo=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
Expand Down
1 change: 0 additions & 1 deletion resources/iam_group_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func IamGroupPolicies() *schema.Table {
Name: "aws_iam_group_policies",
Description: "Inline policies that are embedded in the specified IAM group",
Resolver: fetchIamGroupPolicies,
Multiplex: client.AccountMultiplex,
IgnoreError: client.IgnoreAccessDeniedServiceDisabled,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"group_cq_id", "policy_name"}},
Columns: []schema.Column{
Expand Down
1 change: 0 additions & 1 deletion resources/iam_role_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func IamRolePolicies() *schema.Table {
Name: "aws_iam_role_policies",
Description: "Inline policies that are embedded in the specified IAM role",
Resolver: fetchIamRolePolicies,
Multiplex: client.AccountMultiplex,
IgnoreError: client.IgnoreAccessDeniedServiceDisabled,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"role_cq_id", "policy_name"}},
Columns: []schema.Column{
Expand Down
1 change: 0 additions & 1 deletion resources/iam_user_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ func IamUserPolicies() *schema.Table {
Name: "aws_iam_user_policies",
Description: "Inline policies that are embedded in the specified IAM user",
Resolver: fetchIamUserPolicies,
Multiplex: client.AccountMultiplex,
IgnoreError: client.IgnoreAccessDeniedServiceDisabled,
Options: schema.TableCreationOptions{PrimaryKeys: []string{"user_cq_id", "policy_name"}},
Columns: []schema.Column{
Expand Down
3 changes: 3 additions & 0 deletions resources/iam_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,9 @@ func fetchIamUserAccessKeys(ctx context.Context, meta schema.ClientMeta, parent

func postIamUserAccessKeyResolver(ctx context.Context, meta schema.ClientMeta, resource *schema.Resource) error {
r := resource.Item.(wrappedKey)
if r.AccessKeyId == nil {
return nil
}
svc := meta.(*client.Client).Services().IAM
output, err := svc.GetAccessKeyLastUsed(ctx, &iam.GetAccessKeyLastUsedInput{AccessKeyId: r.AccessKeyId})
if err != nil {
Expand Down