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

Allows removal of token_validity_units block #30662

Merged
merged 2 commits into from
Apr 13, 2023

Conversation

gdavison
Copy link
Contributor

Description

Removing token_validity_units would return the error

produced an unexpected new value: .token_validity_units: block count changed from 0 to 1.

Relations

Closes #30433

References

Output from Acceptance Testing

$ make testacc PKG=cognitoidp TESTS='TestAccCognitoIDPManagedUserPoolClient_| TestAccCognitoIDPUserPoolClient_'

--- PASS: TestAccCognitoIDPUserPoolClient_Disappears_userPool (64.36s)
--- PASS: TestAccCognitoIDPUserPoolClient_tokenValidityUnits_explicitDefaults (69.81s)
--- PASS: TestAccCognitoIDPUserPoolClient_allFields (80.40s)
--- PASS: TestAccCognitoIDPUserPoolClient_basic (84.47s)
--- PASS: TestAccCognitoIDPUserPoolClient_frameworkMigration_nulls (101.36s)
--- PASS: TestAccCognitoIDPUserPoolClient_frameworkMigration_emptySet (103.68s)
--- PASS: TestAccCognitoIDPUserPoolClient_frameworkMigration_basic (105.84s)
--- PASS: TestAccCognitoIDPUserPoolClient_emptySets (106.65s)
--- PASS: TestAccCognitoIDPUserPoolClient_nulls (109.45s)
--- PASS: TestAccCognitoIDPUserPoolClient_disappears (55.20s)
--- PASS: TestAccCognitoIDPUserPoolClient_allFieldsUpdatingOneField (119.68s)
--- PASS: TestAccCognitoIDPUserPoolClient_authSessionValidity (124.02s)
--- PASS: TestAccCognitoIDPUserPoolClient_name (124.06s)
--- PASS: TestAccCognitoIDPUserPoolClient_accessTokenValidity (124.59s)
--- PASS: TestAccCognitoIDPUserPoolClient_idTokenValidity (125.16s)
--- PASS: TestAccCognitoIDPUserPoolClient_tokenValidityUnitsWTokenValidity (125.69s)
--- PASS: TestAccCognitoIDPUserPoolClient_refreshTokenValidity (125.70s)
--- PASS: TestAccCognitoIDPUserPoolClient_tokenValidityUnits_AccessToken (126.22s)
--- PASS: TestAccCognitoIDPUserPoolClient_enableRevocation (126.53s)
--- PASS: TestAccCognitoIDPUserPoolClient_analyticsWithARN (127.97s)
--- PASS: TestAccCognitoIDPUserPoolClient_tokenValidityUnits (137.00s)
--- PASS: TestAccCognitoIDPUserPoolClient_analyticsApplicationID (86.22s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_allFieldsUpdatingOneField (1568.25s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_nulls (1649.10s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_idTokenValidity (1680.60s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_Disappears_OpenSearchDomain (1715.06s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_tokenValidityUnitsWTokenValidity (1749.87s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_tokenValidityUnits_explicitDefaults (1784.09s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_tokenValidityUnits (1894.12s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_namePattern (1900.40s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_allFields (2010.07s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_emptySets (2034.38s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_tokenValidityUnits_AccessToken (2109.76s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_authSessionValidity (2160.25s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_accessTokenValidity (2224.39s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_refreshTokenValidity (2307.31s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_basic (2349.83s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_enableRevocation (2652.58s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_analyticsApplicationID (2868.68s)

@github-actions
Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/cognitoidp Issues and PRs that pertain to the cognitoidp service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. labels Apr 11, 2023
@gdavison gdavison force-pushed the b-cognito-units-inconsistent branch from edadf4d to 4662da4 Compare April 11, 2023 23:37
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🥇

$ make testacc PKG=cognitoidp TESTS='TestAccCognitoIDPManagedUserPoolClient_| TestAccCognitoIDPUserPoolClient_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cognitoidp/... -v -count 1 -parallel 20 -run='TestAccCognitoIDPManagedUserPoolClient_| TestAccCognitoIDPUserPoolClient_'  -timeout 180m

--- PASS: TestAccCognitoIDPManagedUserPoolClient_refreshTokenValidity_error (4.60s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_idTokenValidity_error (5.02s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_accessTokenValidity_error (5.54s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_enableRevocation (1547.66s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_tokenValidityUnits_AccessToken (1593.92s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_basic (1615.27s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_refreshTokenValidity (1642.58s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_namePattern (1763.17s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_nulls (1773.06s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_allFields (1783.34s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_analyticsApplicationID (1829.61s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_Disappears_OpenSearchDomain (1963.96s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_emptySets (1970.63s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_tokenValidityUnits (2099.81s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_authSessionValidity (2359.53s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_allFieldsUpdatingOneField (2385.17s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_tokenValidityUnitsWTokenValidity (2393.41s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_tokenValidityUnits_explicitDefaults (2685.77s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_idTokenValidity (2805.90s)
--- PASS: TestAccCognitoIDPManagedUserPoolClient_accessTokenValidity (3192.39s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cognitoidp 3195.656s

@gdavison gdavison merged commit 4a9a45d into main Apr 13, 2023
@gdavison gdavison deleted the b-cognito-units-inconsistent branch April 13, 2023 16:38
@github-actions github-actions bot added this to the v4.63.0 milestone Apr 13, 2023
@derzierau
Copy link

hey, thank you for fixing the bug, but now we are experiencing InvalidParameterException: Invalid range for token validity. when applying cognito without an explicitly defined token validity could this be related to your PR? Thanks!

@github-actions
Copy link

This functionality has been released in v4.63.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!

@bjernie
Copy link
Contributor

bjernie commented Apr 21, 2023

I have the same issue as @derzierau

@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 May 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/cognitoidp Issues and PRs that pertain to the cognitoidp service. size/XL 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.

[Bug]: Cognito is not applying a valid configurations after a manual change in a Cognito User Pool App Client.
4 participants