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

cognito user pool deletion protection #27612

Merged
merged 4 commits into from
Nov 3, 2022

Conversation

DrFaust92
Copy link
Collaborator

Description

Relations

Closes #27435

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccCognitoIDPUserPool_ PKG=cognitoidp

--- PASS: TestAccCognitoIDPUserPool_disappears (32.93s)
--- PASS: TestAccCognitoIDPUserPool_withAdminCreateUserAndPasswordPolicy (44.45s)
--- PASS: TestAccCognitoIDPUserPool_basic (47.42s)
--- PASS: TestAccCognitoIDPUserPool_schemaAttributesModified (53.07s)
--- PASS: TestAccCognitoIDPUserPool_schemaAttributesRemoved (53.28s)
--- PASS: TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings (65.88s)
--- PASS: TestAccCognitoIDPUserPool_withAdminCreateUser (73.19s)
--- PASS: TestAccCognitoIDPUserPool_withVerificationMessageTemplate (75.09s)
--- PASS: TestAccCognitoIDPUserPool_withEmailVerificationMessage (75.41s)
--- PASS: TestAccCognitoIDPUserPool_smsAuthenticationMessage (77.99s)
--- PASS: TestAccCognitoIDPUserPool_schemaAttributes (78.32s)
--- PASS: TestAccCognitoIDPUserPool_smsVerificationMessage (81.39s)
--- PASS: TestAccCognitoIDPUserPool_withAdvancedSecurityMode (99.18s)
--- PASS: TestAccCognitoIDPUserPool_SMS_snsCallerARN (112.54s)
--- PASS: TestAccCognitoIDPUserPool_withDevice (68.74s)
--- PASS: TestAccCognitoIDPUserPool_SMS_externalID (116.24s)
--- PASS: TestAccCognitoIDPUserPool_withEmail (38.43s)
--- PASS: TestAccCognitoIDPUserPool_withUsernameAttributes (69.34s)
--- PASS: TestAccCognitoIDPUserPool_MFA_smsAndSoftwareTokenMFA (123.69s)
--- PASS: TestAccCognitoIDPUserPool_WithLambda_email (126.11s)
--- PASS: TestAccCognitoIDPUserPool_MFA_softwareTokenMFA (96.98s)
--- PASS: TestAccCognitoIDPUserPool_sms (132.44s)
--- PASS: TestAccCognitoIDPUserPool_MFA_softwareTokenMFAToSMS (91.83s)
--- PASS: TestAccCognitoIDPUserPool_withUsername (65.98s)
--- PASS: TestAccCognitoIDPUserPool_withPasswordPolicy (65.09s)
--- PASS: TestAccCognitoIDPUserPool_withAliasAttributes (65.49s)
--- PASS: TestAccCognitoIDPUserPool_MFA_sms (146.22s)
--- PASS: TestAccCognitoIDPUserPool_update (156.27s)
--- PASS: TestAccCognitoIDPUserPool_withTags (85.74s)
--- PASS: TestAccCognitoIDPUserPool_MFA_smsToSoftwareTokenMFA (82.75s)
--- PASS: TestAccCognitoIDPUserPool_WithLambda_sms (114.73s)
--- PASS: TestAccCognitoIDPUserPool_deletionProtection (56.88s)
--- PASS: TestAccCognitoIDPUserPool_recovery (86.44s)
--- PASS: TestAccCognitoIDPUserPool_withLambda (140.48s)

@github-actions
Copy link

github-actions bot commented Nov 3, 2022

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 needs-triage Waiting for first response or review from a maintainer. size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/cognitoidp Issues and PRs that pertain to the cognitoidp service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 3, 2022
@DrFaust92 DrFaust92 marked this pull request as ready for review November 3, 2022 08:40
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Nov 3, 2022
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 🚀.

% make testacc TESTARGS='-run=TestAccCognitoIDPUserPool_' PKG=cognitoidp ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cognitoidp/... -v -count 1 -parallel 2  -run=TestAccCognitoIDPUserPool_ -timeout 180m
=== RUN   TestAccCognitoIDPUserPool_basic
=== PAUSE TestAccCognitoIDPUserPool_basic
=== RUN   TestAccCognitoIDPUserPool_deletionProtection
=== PAUSE TestAccCognitoIDPUserPool_deletionProtection
=== RUN   TestAccCognitoIDPUserPool_recovery
=== PAUSE TestAccCognitoIDPUserPool_recovery
=== RUN   TestAccCognitoIDPUserPool_withAdminCreateUser
=== PAUSE TestAccCognitoIDPUserPool_withAdminCreateUser
=== RUN   TestAccCognitoIDPUserPool_withAdminCreateUserAndPasswordPolicy
=== PAUSE TestAccCognitoIDPUserPool_withAdminCreateUserAndPasswordPolicy
=== RUN   TestAccCognitoIDPUserPool_withAdvancedSecurityMode
=== PAUSE TestAccCognitoIDPUserPool_withAdvancedSecurityMode
=== RUN   TestAccCognitoIDPUserPool_withDevice
=== PAUSE TestAccCognitoIDPUserPool_withDevice
=== RUN   TestAccCognitoIDPUserPool_withEmailVerificationMessage
=== PAUSE TestAccCognitoIDPUserPool_withEmailVerificationMessage
=== RUN   TestAccCognitoIDPUserPool_MFA_sms
=== PAUSE TestAccCognitoIDPUserPool_MFA_sms
=== RUN   TestAccCognitoIDPUserPool_MFA_smsAndSoftwareTokenMFA
=== PAUSE TestAccCognitoIDPUserPool_MFA_smsAndSoftwareTokenMFA
=== RUN   TestAccCognitoIDPUserPool_MFA_smsToSoftwareTokenMFA
=== PAUSE TestAccCognitoIDPUserPool_MFA_smsToSoftwareTokenMFA
=== RUN   TestAccCognitoIDPUserPool_MFA_softwareTokenMFA
=== PAUSE TestAccCognitoIDPUserPool_MFA_softwareTokenMFA
=== RUN   TestAccCognitoIDPUserPool_MFA_softwareTokenMFAToSMS
=== PAUSE TestAccCognitoIDPUserPool_MFA_softwareTokenMFAToSMS
=== RUN   TestAccCognitoIDPUserPool_smsAuthenticationMessage
=== PAUSE TestAccCognitoIDPUserPool_smsAuthenticationMessage
=== RUN   TestAccCognitoIDPUserPool_sms
=== PAUSE TestAccCognitoIDPUserPool_sms
=== RUN   TestAccCognitoIDPUserPool_SMS_externalID
=== PAUSE TestAccCognitoIDPUserPool_SMS_externalID
=== RUN   TestAccCognitoIDPUserPool_SMS_snsCallerARN
=== PAUSE TestAccCognitoIDPUserPool_SMS_snsCallerARN
=== RUN   TestAccCognitoIDPUserPool_smsVerificationMessage
=== PAUSE TestAccCognitoIDPUserPool_smsVerificationMessage
=== RUN   TestAccCognitoIDPUserPool_withEmail
=== PAUSE TestAccCognitoIDPUserPool_withEmail
=== RUN   TestAccCognitoIDPUserPool_withEmailSource
    user_pool_test.go:786: 'TEST_AWS_SES_VERIFIED_EMAIL_ARN' not set, skipping test.
--- SKIP: TestAccCognitoIDPUserPool_withEmailSource (0.00s)
=== RUN   TestAccCognitoIDPUserPool_withTags
=== PAUSE TestAccCognitoIDPUserPool_withTags
=== RUN   TestAccCognitoIDPUserPool_withAliasAttributes
=== PAUSE TestAccCognitoIDPUserPool_withAliasAttributes
=== RUN   TestAccCognitoIDPUserPool_withUsernameAttributes
=== PAUSE TestAccCognitoIDPUserPool_withUsernameAttributes
=== RUN   TestAccCognitoIDPUserPool_withPasswordPolicy
=== PAUSE TestAccCognitoIDPUserPool_withPasswordPolicy
=== RUN   TestAccCognitoIDPUserPool_withUsername
=== PAUSE TestAccCognitoIDPUserPool_withUsername
=== RUN   TestAccCognitoIDPUserPool_withLambda
=== PAUSE TestAccCognitoIDPUserPool_withLambda
=== RUN   TestAccCognitoIDPUserPool_WithLambda_email
=== PAUSE TestAccCognitoIDPUserPool_WithLambda_email
=== RUN   TestAccCognitoIDPUserPool_WithLambda_sms
=== PAUSE TestAccCognitoIDPUserPool_WithLambda_sms
=== RUN   TestAccCognitoIDPUserPool_schemaAttributes
=== PAUSE TestAccCognitoIDPUserPool_schemaAttributes
=== RUN   TestAccCognitoIDPUserPool_schemaAttributesRemoved
=== PAUSE TestAccCognitoIDPUserPool_schemaAttributesRemoved
=== RUN   TestAccCognitoIDPUserPool_schemaAttributesModified
=== PAUSE TestAccCognitoIDPUserPool_schemaAttributesModified
=== RUN   TestAccCognitoIDPUserPool_withVerificationMessageTemplate
=== PAUSE TestAccCognitoIDPUserPool_withVerificationMessageTemplate
=== RUN   TestAccCognitoIDPUserPool_update
=== PAUSE TestAccCognitoIDPUserPool_update
=== RUN   TestAccCognitoIDPUserPool_disappears
=== PAUSE TestAccCognitoIDPUserPool_disappears
=== RUN   TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings
=== PAUSE TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings
=== CONT  TestAccCognitoIDPUserPool_basic
=== CONT  TestAccCognitoIDPUserPool_smsVerificationMessage
--- PASS: TestAccCognitoIDPUserPool_basic (20.60s)
=== CONT  TestAccCognitoIDPUserPool_MFA_smsAndSoftwareTokenMFA
--- PASS: TestAccCognitoIDPUserPool_smsVerificationMessage (33.30s)
=== CONT  TestAccCognitoIDPUserPool_SMS_snsCallerARN
--- PASS: TestAccCognitoIDPUserPool_MFA_smsAndSoftwareTokenMFA (56.72s)
=== CONT  TestAccCognitoIDPUserPool_SMS_externalID
--- PASS: TestAccCognitoIDPUserPool_SMS_snsCallerARN (63.18s)
=== CONT  TestAccCognitoIDPUserPool_sms
--- PASS: TestAccCognitoIDPUserPool_SMS_externalID (78.56s)
=== CONT  TestAccCognitoIDPUserPool_smsAuthenticationMessage
--- PASS: TestAccCognitoIDPUserPool_sms (70.12s)
=== CONT  TestAccCognitoIDPUserPool_MFA_softwareTokenMFAToSMS
--- PASS: TestAccCognitoIDPUserPool_smsAuthenticationMessage (33.37s)
=== CONT  TestAccCognitoIDPUserPool_MFA_softwareTokenMFA
--- PASS: TestAccCognitoIDPUserPool_MFA_softwareTokenMFAToSMS (51.41s)
=== CONT  TestAccCognitoIDPUserPool_MFA_smsToSoftwareTokenMFA
--- PASS: TestAccCognitoIDPUserPool_MFA_softwareTokenMFA (45.22s)
=== CONT  TestAccCognitoIDPUserPool_withAdvancedSecurityMode
--- PASS: TestAccCognitoIDPUserPool_MFA_smsToSoftwareTokenMFA (51.48s)
=== CONT  TestAccCognitoIDPUserPool_MFA_sms
--- PASS: TestAccCognitoIDPUserPool_withAdvancedSecurityMode (44.87s)
=== CONT  TestAccCognitoIDPUserPool_withEmailVerificationMessage
--- PASS: TestAccCognitoIDPUserPool_withEmailVerificationMessage (54.02s)
=== CONT  TestAccCognitoIDPUserPool_withDevice
--- PASS: TestAccCognitoIDPUserPool_MFA_sms (108.66s)
=== CONT  TestAccCognitoIDPUserPool_withAdminCreateUser
--- PASS: TestAccCognitoIDPUserPool_withDevice (57.48s)
=== CONT  TestAccCognitoIDPUserPool_withAdminCreateUserAndPasswordPolicy
--- PASS: TestAccCognitoIDPUserPool_withAdminCreateUserAndPasswordPolicy (34.03s)
=== CONT  TestAccCognitoIDPUserPool_recovery
--- PASS: TestAccCognitoIDPUserPool_withAdminCreateUser (56.63s)
=== CONT  TestAccCognitoIDPUserPool_deletionProtection
--- PASS: TestAccCognitoIDPUserPool_deletionProtection (56.44s)
=== CONT  TestAccCognitoIDPUserPool_WithLambda_sms
--- PASS: TestAccCognitoIDPUserPool_recovery (78.76s)
=== CONT  TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings
--- PASS: TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings (51.14s)
=== CONT  TestAccCognitoIDPUserPool_disappears
--- PASS: TestAccCognitoIDPUserPool_disappears (28.91s)
=== CONT  TestAccCognitoIDPUserPool_update
--- PASS: TestAccCognitoIDPUserPool_WithLambda_sms (94.86s)
=== CONT  TestAccCognitoIDPUserPool_withVerificationMessageTemplate
--- PASS: TestAccCognitoIDPUserPool_withVerificationMessageTemplate (66.76s)
=== CONT  TestAccCognitoIDPUserPool_schemaAttributesModified
--- PASS: TestAccCognitoIDPUserPool_schemaAttributesModified (47.80s)
=== CONT  TestAccCognitoIDPUserPool_schemaAttributesRemoved
--- PASS: TestAccCognitoIDPUserPool_update (117.82s)
=== CONT  TestAccCognitoIDPUserPool_schemaAttributes
--- PASS: TestAccCognitoIDPUserPool_schemaAttributesRemoved (26.39s)
=== CONT  TestAccCognitoIDPUserPool_withPasswordPolicy
--- PASS: TestAccCognitoIDPUserPool_schemaAttributes (41.20s)
=== CONT  TestAccCognitoIDPUserPool_WithLambda_email
--- PASS: TestAccCognitoIDPUserPool_withPasswordPolicy (48.52s)
=== CONT  TestAccCognitoIDPUserPool_withLambda
--- PASS: TestAccCognitoIDPUserPool_WithLambda_email (82.27s)
=== CONT  TestAccCognitoIDPUserPool_withUsername
--- PASS: TestAccCognitoIDPUserPool_withLambda (91.87s)
=== CONT  TestAccCognitoIDPUserPool_withUsernameAttributes
--- PASS: TestAccCognitoIDPUserPool_withUsername (43.87s)
=== CONT  TestAccCognitoIDPUserPool_withTags
--- PASS: TestAccCognitoIDPUserPool_withUsernameAttributes (39.67s)
=== CONT  TestAccCognitoIDPUserPool_withEmail
--- PASS: TestAccCognitoIDPUserPool_withTags (55.56s)
=== CONT  TestAccCognitoIDPUserPool_withAliasAttributes
--- PASS: TestAccCognitoIDPUserPool_withEmail (23.67s)
--- PASS: TestAccCognitoIDPUserPool_withAliasAttributes (40.17s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/cognitoidp	968.650s

@ewbankkit
Copy link
Contributor

@DrFaust92 Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit d2ea2f2 into hashicorp:main Nov 3, 2022
@github-actions github-actions bot added this to the v4.38.0 milestone Nov 3, 2022
@DrFaust92 DrFaust92 added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 3, 2022
ewbankkit added a commit that referenced this pull request Nov 3, 2022
@github-actions
Copy link

github-actions bot commented Nov 3, 2022

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

github-actions bot commented Dec 5, 2022

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 Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/cognitoidp Issues and PRs that pertain to the cognitoidp service. size/M 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.

[Enhancement]: aws_cognito_user_pool Deletion Protection Setting
2 participants