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

Bugfix\cognito user pools #126

Merged
merged 2 commits into from
Jul 30, 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.0-beta
github.com/cloudquery/cq-provider-sdk v0.3.1
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 @@ -174,8 +174,8 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
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/cloudquery/cq-provider-sdk v0.3.0-beta h1:0On0jD6iacHdx+uVAzvccwXw7nVudRcZHYddaQXlHhs=
github.com/cloudquery/cq-provider-sdk v0.3.0-beta/go.mod h1:N+hB03nTEaZYeGmnSMR+Q1waGlKreG0Ii83/lkdY/9I=
github.com/cloudquery/cq-provider-sdk v0.3.1 h1:Pa7k9ACExCWIY2ASNnpjAsCgCFdFHHEJdZFds3XRVUs=
github.com/cloudquery/cq-provider-sdk v0.3.1/go.mod h1:xKxCr9bTBlID9zte2hwdAfPYU3b8g2IjB+MbSR9gVDc=
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
5 changes: 4 additions & 1 deletion resources/cognito_user_pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,10 @@ func fetchCognitoUserPools(ctx context.Context, meta schema.ClientMeta, parent *
c := meta.(*client.Client)
svc := c.Services().CognitoUserPools
optsFunc := func(options *cognitoidentityprovider.Options) { options.Region = c.Region }
var params cognitoidentityprovider.ListUserPoolsInput
params := cognitoidentityprovider.ListUserPoolsInput{
// we want max results to reduce List calls as much as possible, services limited to less than or equal to 60"
MaxResults: 60,
}
for {
out, err := svc.ListUserPools(ctx, &params, optsFunc)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion resources/cognito_user_pools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func buildCognitoUserPools(t *testing.T, ctrl *gomock.Controller) client.Service
}
m.EXPECT().ListUserPools(
gomock.Any(),
&cognitoidentityprovider.ListUserPoolsInput{},
&cognitoidentityprovider.ListUserPoolsInput{MaxResults: 60},
gomock.Any(),
).Return(
&cognitoidentityprovider.ListUserPoolsOutput{UserPools: []types.UserPoolDescriptionType{desc}},
Expand Down