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

r/cognito_user_pool_client - adjust token validity validation #19702

Merged

Conversation

DrFaust92
Copy link
Collaborator

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #18090

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSCognitoUserPoolClient_'
--- PASS: TestAccAWSCognitoUserPoolClient_disappears_userPool (42.75s)
--- PASS: TestAccAWSCognitoUserPoolClient_basic (52.69s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (56.13s)
--- PASS: TestAccAWSCognitoUserPoolClient_disappears (57.51s)
--- PASS: TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn (68.38s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnits (90.85s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (92.22s)
--- PASS: TestAccAWSCognitoUserPoolClient_refreshTokenValidity (93.02s)
--- PASS: TestAccAWSCognitoUserPoolClient_idTokenValidity (93.08s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (95.26s)
--- PASS: TestAccAWSCognitoUserPoolClient_accessTokenValidity (95.86s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity (97.71s)
--- PASS: TestAccAWSCognitoUserPoolClient_analyticsConfig (138.17s)

@DrFaust92 DrFaust92 requested a review from a team as a code owner June 7, 2021 20:23
@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Jun 7, 2021
@github-actions github-actions bot added service/cognito tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jun 7, 2021
@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 Jun 7, 2021
@DrFaust92 DrFaust92 changed the title r/user_pool_client - adjust token validity validation r/cognito_user_pool_client - adjust token validity validation Jun 7, 2021
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSCognitoUserPoolClient_'                                                  
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSCognitoUserPoolClient_ -timeout 180m
=== RUN   TestAccAWSCognitoUserPoolClient_basic
=== PAUSE TestAccAWSCognitoUserPoolClient_basic
=== RUN   TestAccAWSCognitoUserPoolClient_refreshTokenValidity
=== PAUSE TestAccAWSCognitoUserPoolClient_refreshTokenValidity
=== RUN   TestAccAWSCognitoUserPoolClient_accessTokenValidity
=== PAUSE TestAccAWSCognitoUserPoolClient_accessTokenValidity
=== RUN   TestAccAWSCognitoUserPoolClient_idTokenValidity
=== PAUSE TestAccAWSCognitoUserPoolClient_idTokenValidity
=== RUN   TestAccAWSCognitoUserPoolClient_tokenValidityUnits
=== PAUSE TestAccAWSCognitoUserPoolClient_tokenValidityUnits
=== RUN   TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity
=== PAUSE TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity
=== RUN   TestAccAWSCognitoUserPoolClient_Name
=== PAUSE TestAccAWSCognitoUserPoolClient_Name
=== RUN   TestAccAWSCognitoUserPoolClient_allFields
=== PAUSE TestAccAWSCognitoUserPoolClient_allFields
=== RUN   TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== PAUSE TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== RUN   TestAccAWSCognitoUserPoolClient_analyticsConfig
=== PAUSE TestAccAWSCognitoUserPoolClient_analyticsConfig
=== RUN   TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn
=== PAUSE TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn
=== RUN   TestAccAWSCognitoUserPoolClient_disappears
=== PAUSE TestAccAWSCognitoUserPoolClient_disappears
=== RUN   TestAccAWSCognitoUserPoolClient_disappears_userPool
=== PAUSE TestAccAWSCognitoUserPoolClient_disappears_userPool
=== CONT  TestAccAWSCognitoUserPoolClient_basic
=== CONT  TestAccAWSCognitoUserPoolClient_allFields
=== CONT  TestAccAWSCognitoUserPoolClient_tokenValidityUnits
=== CONT  TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn
=== CONT  TestAccAWSCognitoUserPoolClient_disappears
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfig
=== CONT  TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== CONT  TestAccAWSCognitoUserPoolClient_idTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_disappears_userPool
=== CONT  TestAccAWSCognitoUserPoolClient_accessTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_refreshTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_Name
--- PASS: TestAccAWSCognitoUserPoolClient_disappears_userPool (20.16s)
--- PASS: TestAccAWSCognitoUserPoolClient_disappears (24.21s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (25.96s)
--- PASS: TestAccAWSCognitoUserPoolClient_basic (26.96s)
--- PASS: TestAccAWSCognitoUserPoolClient_refreshTokenValidity (40.12s)
--- PASS: TestAccAWSCognitoUserPoolClient_accessTokenValidity (41.47s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (41.69s)
--- PASS: TestAccAWSCognitoUserPoolClient_idTokenValidity (41.77s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (41.97s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity (42.06s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnits (42.34s)
--- PASS: TestAccAWSCognitoUserPoolClient_analyticsConfig (65.37s)
--- PASS: TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn (85.29s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	88.379s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSCognitoUserPoolClient_' 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSCognitoUserPoolClient_ -timeout 180m
=== RUN   TestAccAWSCognitoUserPoolClient_basic
=== PAUSE TestAccAWSCognitoUserPoolClient_basic
=== RUN   TestAccAWSCognitoUserPoolClient_refreshTokenValidity
=== PAUSE TestAccAWSCognitoUserPoolClient_refreshTokenValidity
=== RUN   TestAccAWSCognitoUserPoolClient_accessTokenValidity
=== PAUSE TestAccAWSCognitoUserPoolClient_accessTokenValidity
=== RUN   TestAccAWSCognitoUserPoolClient_idTokenValidity
=== PAUSE TestAccAWSCognitoUserPoolClient_idTokenValidity
=== RUN   TestAccAWSCognitoUserPoolClient_tokenValidityUnits
=== PAUSE TestAccAWSCognitoUserPoolClient_tokenValidityUnits
=== RUN   TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity
=== PAUSE TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity
=== RUN   TestAccAWSCognitoUserPoolClient_Name
=== PAUSE TestAccAWSCognitoUserPoolClient_Name
=== RUN   TestAccAWSCognitoUserPoolClient_allFields
=== PAUSE TestAccAWSCognitoUserPoolClient_allFields
=== RUN   TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== PAUSE TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== RUN   TestAccAWSCognitoUserPoolClient_analyticsConfig
=== PAUSE TestAccAWSCognitoUserPoolClient_analyticsConfig
=== RUN   TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn
=== PAUSE TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn
=== RUN   TestAccAWSCognitoUserPoolClient_disappears
=== PAUSE TestAccAWSCognitoUserPoolClient_disappears
=== RUN   TestAccAWSCognitoUserPoolClient_disappears_userPool
=== PAUSE TestAccAWSCognitoUserPoolClient_disappears_userPool
=== CONT  TestAccAWSCognitoUserPoolClient_basic
=== CONT  TestAccAWSCognitoUserPoolClient_allFields
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfig
=== CONT  TestAccAWSCognitoUserPoolClient_disappears_userPool
=== CONT  TestAccAWSCognitoUserPoolClient_idTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_accessTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_disappears
=== CONT  TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== CONT  TestAccAWSCognitoUserPoolClient_tokenValidityUnits
=== CONT  TestAccAWSCognitoUserPoolClient_Name
=== CONT  TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_refreshTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfig
    provider_test.go:1103: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/06/09 09:19:46 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
        
        Error: error creating Cognito User Pool Client (lwcsgnkacs): InvalidParameterException: The integration with Pinpoint is not supported in this region.
        
          on terraform_plugin_test.tf line 55, in resource "aws_cognito_user_pool_client" "test":
          55: resource "aws_cognito_user_pool_client" "test" {
        
        
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn
    provider_test.go:1103: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/06/09 09:19:46 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
        
        Error: error creating Cognito User Pool Client (av67eyr3ch): InvalidParameterException: The integration with Pinpoint is not supported in this region.
        
          on terraform_plugin_test.tf line 55, in resource "aws_cognito_user_pool_client" "test":
          55: resource "aws_cognito_user_pool_client" "test" {
        
        
--- SKIP: TestAccAWSCognitoUserPoolClient_analyticsConfig (17.94s)
--- SKIP: TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn (18.00s)
--- PASS: TestAccAWSCognitoUserPoolClient_disappears_userPool (21.98s)
--- PASS: TestAccAWSCognitoUserPoolClient_disappears (25.97s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (28.44s)
--- PASS: TestAccAWSCognitoUserPoolClient_basic (29.71s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (41.66s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnits (41.69s)
--- PASS: TestAccAWSCognitoUserPoolClient_idTokenValidity (42.40s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (45.37s)
--- PASS: TestAccAWSCognitoUserPoolClient_refreshTokenValidity (45.55s)
--- PASS: TestAccAWSCognitoUserPoolClient_accessTokenValidity (45.65s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity (45.67s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	48.764s

@ewbankkit ewbankkit merged commit 7b1bd75 into hashicorp:main Jun 9, 2021
@github-actions github-actions bot added this to the v3.45.0 milestone Jun 9, 2021
@DrFaust92 DrFaust92 deleted the r/cognito_user_pool_client_validity branch June 10, 2021 08:07
@github-actions
Copy link

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS Cognito User Pool Client Refresh Token Validity resets to default validity unit when seconds is specified
2 participants