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 - add revocation support + retry on concurrent changes #20031

Merged

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Jul 1, 2021

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 #19794
Closes #19924
Closes #20012

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSCognitoUserPoolClient_'
--- PASS: TestAccAWSCognitoUserPoolClient_disappears_userPool (43.06s)
--- PASS: TestAccAWSCognitoUserPoolClient_disappears (50.31s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (57.72s)
--- PASS: TestAccAWSCognitoUserPoolClient_basic (62.73s)
--- PASS: TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn (67.18s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity (93.37s)
--- PASS: TestAccAWSCognitoUserPoolClient_refreshTokenValidity (93.82s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (94.42s)
--- PASS: TestAccAWSCognitoUserPoolClient_accessTokenValidity (94.44s)
--- PASS: TestAccAWSCognitoUserPoolClient_idTokenValidity (94.68s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (94.92s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnits (95.24s)
--- PASS: TestAccAWSCognitoUserPoolClient_enableRevocation (128.46s)
--- PASS: TestAccAWSCognitoUserPoolClient_analyticsConfig (145.04s)

@github-actions github-actions bot added service/cognito tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/M Managed by automation to categorize the size of a PR. labels Jul 1, 2021
@DrFaust92 DrFaust92 added bug Addresses a defect in current functionality. enhancement Requests to existing resources that expand the functionality or scope. labels Jul 1, 2021
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Jul 1, 2021
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Jul 1, 2021
@DrFaust92 DrFaust92 marked this pull request as ready for review July 1, 2021 14:27
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_enableRevocation
=== PAUSE TestAccAWSCognitoUserPoolClient_enableRevocation
=== 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_allFieldsUpdatingOneField
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfig
=== CONT  TestAccAWSCognitoUserPoolClient_disappears
=== CONT  TestAccAWSCognitoUserPoolClient_enableRevocation
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn
=== CONT  TestAccAWSCognitoUserPoolClient_idTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_Name
=== CONT  TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_disappears_userPool
=== CONT  TestAccAWSCognitoUserPoolClient_refreshTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_tokenValidityUnits
=== CONT  TestAccAWSCognitoUserPoolClient_accessTokenValidity
--- PASS: TestAccAWSCognitoUserPoolClient_disappears_userPool (31.39s)
--- PASS: TestAccAWSCognitoUserPoolClient_disappears (40.06s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (46.44s)
--- PASS: TestAccAWSCognitoUserPoolClient_basic (46.61s)
--- PASS: TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn (49.65s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (73.97s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (74.05s)
--- PASS: TestAccAWSCognitoUserPoolClient_idTokenValidity (74.36s)
--- PASS: TestAccAWSCognitoUserPoolClient_accessTokenValidity (74.37s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity (74.37s)
--- PASS: TestAccAWSCognitoUserPoolClient_refreshTokenValidity (74.69s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnits (74.81s)
--- PASS: TestAccAWSCognitoUserPoolClient_enableRevocation (86.77s)
--- PASS: TestAccAWSCognitoUserPoolClient_analyticsConfig (88.86s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	92.568s
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_enableRevocation
=== PAUSE TestAccAWSCognitoUserPoolClient_enableRevocation
=== 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_disappears_userPool
=== CONT  TestAccAWSCognitoUserPoolClient_disappears
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfig
=== CONT  TestAccAWSCognitoUserPoolClient_idTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_enableRevocation
=== CONT  TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== CONT  TestAccAWSCognitoUserPoolClient_tokenValidityUnits
=== CONT  TestAccAWSCognitoUserPoolClient_accessTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_refreshTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_Name
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn
    provider_test.go:1103: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/07/09 11:53:39 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.14.0
        
        Error: error creating Cognito User Pool Client (tf-acc-test-6831183117328662861): 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_analyticsConfig
    provider_test.go:1103: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/07/09 11:53:39 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.14.0
        
        Error: error creating Cognito User Pool Client (tf-acc-test-9180381470522613361): 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_analyticsConfigWithArn (32.68s)
--- SKIP: TestAccAWSCognitoUserPoolClient_analyticsConfig (32.81s)
--- PASS: TestAccAWSCognitoUserPoolClient_disappears_userPool (41.49s)
--- PASS: TestAccAWSCognitoUserPoolClient_disappears (51.04s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (54.13s)
--- PASS: TestAccAWSCognitoUserPoolClient_basic (54.79s)
--- PASS: TestAccAWSCognitoUserPoolClient_refreshTokenValidity (73.02s)
--- PASS: TestAccAWSCognitoUserPoolClient_accessTokenValidity (73.59s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (75.75s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (75.82s)
--- PASS: TestAccAWSCognitoUserPoolClient_idTokenValidity (75.94s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity (76.19s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnits (76.20s)
--- PASS: TestAccAWSCognitoUserPoolClient_enableRevocation (89.35s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	94.212s

@ewbankkit ewbankkit merged commit 0e98ae9 into hashicorp:main Jul 9, 2021
@github-actions github-actions bot added this to the v3.50.0 milestone Jul 9, 2021
@github-actions
Copy link

This functionality has been released in v3.50.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 Aug 15, 2021
@DrFaust92 DrFaust92 deleted the r/cognito_user_pool_client_revoke branch February 12, 2022 12:51
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. documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. size/L 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
2 participants