-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/aws: Added Cognito Identity Pool #13783
Conversation
5a5b16b
to
777df57
Compare
777df57
to
6aba53c
Compare
@radeksimko Step 2 on 3 :) |
6aba53c
to
eec174d
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.
}, | ||
|
||
"cognito_identity_providers": { | ||
Type: schema.TypeSet, |
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.
Any reason why a set over a list?
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.
Ok so we talked with @radeksimko about this (thanks for the input by the way 👍 ) and a TypeSet is totally fine.
The ordering of providers doesn't matter, since they are no fallbacks when authenticating as far as we know! :)
Optional: true, | ||
ValidateFunc: validateCognitoIdentityProvidersProviderName, | ||
}, | ||
"server_side_token_check": { |
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.
I think we should set a default here - otherwise you will never be able to change from true -> false based on the bug with d.GetOk and default values (i.e. default bool being false)
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.
Oh didn't know there was this bug! fixing :)
|
||
"allow_unauthenticated_identities": { | ||
Type: schema.TypeBool, | ||
Required: true, |
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.
Think we should set a default on this as well otherwise that bug will reappear
IdentityPoolId: aws.String(d.Id()), | ||
}) | ||
if err != nil { | ||
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" { |
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.
Nice to see this as part of it straight away :)
eec174d
to
5de6e66
Compare
Hey @stack72 Thanks for the review! I've made the changes you asked, and also removed the hash function on the Tests
|
Thanks for this work @Ninir :) LGTM! Was purely curious about the Set vs List so was more of a question rather than anything else Nice to see the use of the default Hash as well! |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
This adds Cognito Identity Pool, and is the second step for integrating Cognito.
(This is just splitting #12846 in 3, for better reviews :))
Tests