Skip to content
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

resource/cognito_user_pool_client: support USER_PASSWORD_AUTH for explicit_auth_flows #3417

Conversation

@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Feb 16, 2018
@loivis loivis force-pushed the 3397-cognito-user-pool-client-explicit_auth_flows branch from f1c8776 to e31c39f Compare February 16, 2018 15:18
@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Feb 16, 2018
Copy link
Contributor

@Ninir Ninir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @loivis

Thanks for the work here, looks very good!
Just left a question to address prior to merging.

Tell us if you need any help :) 🚀

@@ -53,6 +53,7 @@ func resourceAwsCognitoUserPoolClient() *schema.Resource {
ValidateFunc: validation.StringInSlice([]string{
cognitoidentityprovider.ExplicitAuthFlowsTypeAdminNoSrpAuth,
cognitoidentityprovider.ExplicitAuthFlowsTypeCustomAuthFlowOnly,
cognitoidentityprovider.ExplicitAuthFlowsTypeUserPasswordAuth,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an acctest for that so that we ensure there won't be regression in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about acctest before committing the change but not sure what to test actually. USER_PASSWORD_AUTH is a new type of ExplicitAuthFlows.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My general opinion is if the SDK is providing the constant, that means AWS has added it to their acceptable values in their generated API model, and we don't need to provide any acceptance testing if its just updating a validation check. 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall, when working on multiple Cognito ressources, that there was a specificity when using USER_PASSWORD_AUTH... hence my request :)
Adding the value in testAccAWSCognitoUserPoolClientConfig_allFields is fine as it covers the use-case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added all values of explicit_auth_flows in acctest. I'm not clear about the user-case but hope to get your point of change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot recall of the need for it right now... it was not that important, but will keep you updated if it appears to me again.

@Ninir Ninir added bug Addresses a defect in current functionality. waiting-response Maintainers are waiting on response from community or contributor. service/cognito labels Feb 16, 2018
@ghost ghost added size/S Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Feb 19, 2018
@loivis
Copy link
Contributor Author

loivis commented Feb 19, 2018

⎇  make testacc TEST=./aws TESTARGS='-run=TestAccAWSCognitoUserPoolClient_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSCognitoUserPoolClient_ -timeout 120m
=== RUN   TestAccAWSCognitoUserPoolClient_basic
--- PASS: TestAccAWSCognitoUserPoolClient_basic (21.71s)
=== RUN   TestAccAWSCognitoUserPoolClient_allFields
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (21.19s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	42.948s

Copy link
Contributor

@Ninir Ninir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @loivis

This is all good, thanks for the work and additional cleanup, much appreciated! 🚀 :)

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSCognitoUserPoolClient_'         
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSCognitoUserPoolClient_ -timeout 120m
=== RUN   TestAccAWSCognitoUserPoolClient_basic
--- PASS: TestAccAWSCognitoUserPoolClient_basic (95.03s)
=== RUN   TestAccAWSCognitoUserPoolClient_allFields
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (31.97s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	127.040s

@Ninir Ninir merged commit 7766e41 into hashicorp:master Feb 20, 2018
@Ninir Ninir removed the waiting-response Maintainers are waiting on response from community or contributor. label Feb 20, 2018
Ninir added a commit that referenced this pull request Feb 20, 2018
@loivis loivis deleted the 3397-cognito-user-pool-client-explicit_auth_flows branch February 20, 2018 18:04
@bflad bflad added this to the v1.10.0 milestone Feb 27, 2018
@bflad
Copy link
Contributor

bflad commented Feb 27, 2018

This has been released in version 1.10.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 7, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS Cognito user pool client does not allow USER_PASSWORD_AUTH as explicit_auth_flows
3 participants