-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Data Source: cognito_user_pools #4212
New Data Source: cognito_user_pools #4212
Conversation
2ad5499
to
00ea2a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution @loivis! Left some initial comments below -- please let me know if you have any questions.
aws/provider.go
Outdated
@@ -173,6 +173,7 @@ func Provider() terraform.ResourceProvider { | |||
"aws_cloudformation_stack": dataSourceAwsCloudFormationStack(), | |||
"aws_cloudtrail_service_account": dataSourceAwsCloudTrailServiceAccount(), | |||
"aws_cloudwatch_log_group": dataSourceAwsCloudwatchLogGroup(), | |||
"aws_cognito_user_pool_ids": dataSourceAwsCognitoUserPoolIds(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's opt to call it aws_cognito_user_pools
(we may add attributes other than just the ID) - will require refactoring the function names and documentation
website/aws.erb
Outdated
@@ -72,6 +72,8 @@ | |||
</li> | |||
<li<%= sidebar_current("docs-aws-datasource-cloudwatch-log-group") %>> | |||
<a href="/docs/providers/aws/d/cloudwatch_log_group.html">aws_cloudwatch_log_group</a> | |||
<li<%= sidebar_current("docs-aws-datasource-cognito-user-pool-ids") %>> | |||
<a href="/docs/providers/aws/d/cognito_user_pool_ids.html">aws_cognito_user_pool_ids</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing </li>
Type: schema.TypeSet, | ||
Computed: true, | ||
Elem: &schema.Schema{Type: schema.TypeString}, | ||
Set: schema.HashString, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Set: schema.HashString
is unnecessary here
00ea2a5
to
02383f1
Compare
02383f1
to
db6efbb
Compare
db6efbb
to
45bdb47
Compare
45bdb47
to
606a7f2
Compare
606a7f2
to
3d4e4fb
Compare
Opt to Just noticed there are dangling resources after acceptance test. Tried to add sweeper but it didn't seem to work. Did I miss something? |
The test sweeper should be part of the resource and not the data source. Let's address it separately. |
3d4e4fb
to
4448516
Compare
All right. I've removed related code now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
1 test passed (all tests)
=== RUN TestAccDataSourceAwsCognitoUserPools_basic
--- PASS: TestAccDataSourceAwsCognitoUserPools_basic (8.17s)
This has been released in version 1.15.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Complete missing part between cognito user pools and api gateway authorizer.
There is no option to filter cognito user pools, so a simple loop is used to match given name.