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/aws_cognito_user_pool: Support user_attribute_update_settings #27129

Merged
merged 5 commits into from
Oct 11, 2022

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Oct 6, 2022

Description

This PR adds support for user attribute update settings with Cognito IDP user pools.

Relations

Closes #26726

References

Output from Acceptance Testing

$ make testacc TESTS='TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings' PKG=cognitoidp
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cognitoidp/... -v -count 1 -parallel 20 -run='TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings'  -timeout 180m
=== RUN   TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings
=== PAUSE TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings
=== CONT  TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings
--- PASS: TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings (14.75s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cognitoidp 17.381s

@github-actions
Copy link

github-actions bot commented Oct 6, 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 service/cognitoidp Issues and PRs that pertain to the cognitoidp service. size/M Managed by automation to categorize the size of a PR. labels Oct 6, 2022
@jar-b jar-b changed the title r/aws_cognito_user_pool: Support user_attibute_update_settings r/aws_cognito_user_pool: Support user_attribute_update_settings Oct 6, 2022
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Oct 6, 2022
@jar-b jar-b force-pushed the f-aws_cognito_user_pool-update-settings branch from cffdc30 to 7a41641 Compare October 7, 2022 13:27
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Oct 7, 2022
@jar-b jar-b force-pushed the f-aws_cognito_user_pool-update-settings branch from c67fe8e to 77b7b23 Compare October 7, 2022 13:53
@github-actions github-actions bot added the service/transitgateway Issues and PRs that pertain to the transitgateway service. label Oct 7, 2022
@jar-b jar-b marked this pull request as ready for review October 7, 2022 15:07
@jar-b
Copy link
Member Author

jar-b commented Oct 7, 2022

NOTE: Observed acceptance test failures unrelated to this change with v1.3.X of terraform (tests fail against main as well). All tests pass downgrading to v.1.2.9:

$ terraform -v
Terraform v1.2.9
on darwin_arm64

Your version of Terraform is out of date! The latest version
is 1.3.2. You can update by downloading from https://www.terraform.io/downloads.html
$ make testacc TESTS='TestAccCognitoIDPUserPool_' PKG=cognitoidp ACCTEST_PARALLELISM=5
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cognitoidp/... -v -count 1 -parallel 5 -run='TestAccCognitoIDPUserPool_'  -timeout 180m
=== RUN   TestAccCognitoIDPUserPool_basic
=== PAUSE TestAccCognitoIDPUserPool_basic
=== 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:753: '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_withEmail
=== CONT  TestAccCognitoIDPUserPool_MFA_smsToSoftwareTokenMFA
=== CONT  TestAccCognitoIDPUserPool_withDevice
=== CONT  TestAccCognitoIDPUserPool_MFA_smsAndSoftwareTokenMFA
--- PASS: TestAccCognitoIDPUserPool_basic (17.92s)
=== CONT  TestAccCognitoIDPUserPool_MFA_sms
--- PASS: TestAccCognitoIDPUserPool_withEmail (17.94s)
=== CONT  TestAccCognitoIDPUserPool_withEmailVerificationMessage
--- PASS: TestAccCognitoIDPUserPool_withDevice (28.87s)
=== CONT  TestAccCognitoIDPUserPool_WithLambda_sms
--- PASS: TestAccCognitoIDPUserPool_MFA_smsToSoftwareTokenMFA (41.59s)
=== CONT  TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings
--- PASS: TestAccCognitoIDPUserPool_withEmailVerificationMessage (27.11s)
=== CONT  TestAccCognitoIDPUserPool_disappears
--- PASS: TestAccCognitoIDPUserPool_disappears (11.60s)
=== CONT  TestAccCognitoIDPUserPool_update
--- PASS: TestAccCognitoIDPUserPool_MFA_smsAndSoftwareTokenMFA (60.98s)
=== CONT  TestAccCognitoIDPUserPool_withVerificationMessageTemplate
--- PASS: TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings (24.95s)
=== CONT  TestAccCognitoIDPUserPool_schemaAttributesModified
--- PASS: TestAccCognitoIDPUserPool_schemaAttributesModified (17.76s)
=== CONT  TestAccCognitoIDPUserPool_schemaAttributesRemoved
--- PASS: TestAccCognitoIDPUserPool_withVerificationMessageTemplate (26.85s)
=== CONT  TestAccCognitoIDPUserPool_schemaAttributes
--- PASS: TestAccCognitoIDPUserPool_WithLambda_sms (59.12s)
=== CONT  TestAccCognitoIDPUserPool_withAdminCreateUserAndPasswordPolicy
--- PASS: TestAccCognitoIDPUserPool_MFA_sms (76.13s)
=== CONT  TestAccCognitoIDPUserPool_withAdvancedSecurityMode
--- PASS: TestAccCognitoIDPUserPool_schemaAttributesRemoved (18.28s)
=== CONT  TestAccCognitoIDPUserPool_sms
--- PASS: TestAccCognitoIDPUserPool_withAdminCreateUserAndPasswordPolicy (16.09s)
=== CONT  TestAccCognitoIDPUserPool_smsVerificationMessage
--- PASS: TestAccCognitoIDPUserPool_update (55.74s)
=== CONT  TestAccCognitoIDPUserPool_SMS_snsCallerARN
--- PASS: TestAccCognitoIDPUserPool_schemaAttributes (27.21s)
=== CONT  TestAccCognitoIDPUserPool_SMS_externalID
--- PASS: TestAccCognitoIDPUserPool_smsVerificationMessage (26.47s)
=== CONT  TestAccCognitoIDPUserPool_withAdminCreateUser
--- PASS: TestAccCognitoIDPUserPool_withAdvancedSecurityMode (37.55s)
=== CONT  TestAccCognitoIDPUserPool_recovery
--- PASS: TestAccCognitoIDPUserPool_sms (49.41s)
=== CONT  TestAccCognitoIDPUserPool_MFA_softwareTokenMFAToSMS
--- PASS: TestAccCognitoIDPUserPool_withAdminCreateUser (26.61s)
=== CONT  TestAccCognitoIDPUserPool_smsAuthenticationMessage
--- PASS: TestAccCognitoIDPUserPool_recovery (38.19s)
=== CONT  TestAccCognitoIDPUserPool_withPasswordPolicy
--- PASS: TestAccCognitoIDPUserPool_SMS_snsCallerARN (65.62s)
=== CONT  TestAccCognitoIDPUserPool_WithLambda_email
--- PASS: TestAccCognitoIDPUserPool_SMS_externalID (64.84s)
=== CONT  TestAccCognitoIDPUserPool_withLambda
--- PASS: TestAccCognitoIDPUserPool_smsAuthenticationMessage (27.01s)
=== CONT  TestAccCognitoIDPUserPool_withUsername
--- PASS: TestAccCognitoIDPUserPool_withPasswordPolicy (26.97s)
=== CONT  TestAccCognitoIDPUserPool_withAliasAttributes
--- PASS: TestAccCognitoIDPUserPool_MFA_softwareTokenMFAToSMS (46.53s)
=== CONT  TestAccCognitoIDPUserPool_withUsernameAttributes
--- PASS: TestAccCognitoIDPUserPool_withUsername (27.18s)
=== CONT  TestAccCognitoIDPUserPool_withTags
--- PASS: TestAccCognitoIDPUserPool_withAliasAttributes (27.20s)
=== CONT  TestAccCognitoIDPUserPool_MFA_softwareTokenMFA
--- PASS: TestAccCognitoIDPUserPool_withUsernameAttributes (26.99s)
--- PASS: TestAccCognitoIDPUserPool_WithLambda_email (58.94s)
--- PASS: TestAccCognitoIDPUserPool_withTags (37.56s)
--- PASS: TestAccCognitoIDPUserPool_withLambda (74.27s)
--- PASS: TestAccCognitoIDPUserPool_MFA_softwareTokenMFA (37.56s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cognitoidp 264.207s

Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

I have one comment, but otherwise looks good. 🚀

--- PASS: TestAccCognitoIDPUserPool_disappears (49.73s)
--- PASS: TestAccCognitoIDPUserPool_basic (74.14s)
--- PASS: TestAccCognitoIDPUserPool_withEmail (78.56s)
--- PASS: TestAccCognitoIDPUserPool_withUserAttributeUpdateSettings (129.19s)
--- PASS: TestAccCognitoIDPUserPool_smsVerificationMessage (140.72s)
--- PASS: TestAccCognitoIDPUserPool_smsAuthenticationMessage (140.88s)
--- PASS: TestAccCognitoIDPUserPool_withEmailVerificationMessage (141.13s)
--- PASS: TestAccCognitoIDPUserPool_withVerificationMessageTemplate (141.61s)
--- PASS: TestAccCognitoIDPUserPool_withDevice (141.88s)
--- PASS: TestAccCognitoIDPUserPool_withPasswordPolicy (141.95s)
--- PASS: TestAccCognitoIDPUserPool_schemaAttributesModified (102.04s)
--- PASS: TestAccCognitoIDPUserPool_MFA_softwareTokenMFAToSMS (159.71s)
--- PASS: TestAccCognitoIDPUserPool_MFA_smsToSoftwareTokenMFA (160.05s)
--- PASS: TestAccCognitoIDPUserPool_schemaAttributesRemoved (92.53s)
--- PASS: TestAccCognitoIDPUserPool_WithLambda_sms (181.02s)
--- PASS: TestAccCognitoIDPUserPool_SMS_externalID (183.33s)
--- PASS: TestAccCognitoIDPUserPool_MFA_softwareTokenMFA (187.70s)
--- PASS: TestAccCognitoIDPUserPool_SMS_snsCallerARN (189.11s)
--- PASS: TestAccCognitoIDPUserPool_withAdminCreateUserAndPasswordPolicy (62.87s)
--- PASS: TestAccCognitoIDPUserPool_schemaAttributes (123.20s)
--- PASS: TestAccCognitoIDPUserPool_sms (202.08s)
--- PASS: TestAccCognitoIDPUserPool_MFA_smsAndSoftwareTokenMFA (207.48s)
--- PASS: TestAccCognitoIDPUserPool_update (210.50s)
--- PASS: TestAccCognitoIDPUserPool_MFA_sms (214.95s)
--- PASS: TestAccCognitoIDPUserPool_withUsername (89.06s)
--- PASS: TestAccCognitoIDPUserPool_withUsernameAttributes (89.39s)
--- PASS: TestAccCognitoIDPUserPool_withAdminCreateUser (90.47s)
--- PASS: TestAccCognitoIDPUserPool_withAliasAttributes (89.82s)
--- PASS: TestAccCognitoIDPUserPool_withAdvancedSecurityMode (107.07s)
--- PASS: TestAccCognitoIDPUserPool_recovery (107.19s)
--- PASS: TestAccCognitoIDPUserPool_withTags (94.88s)
--- PASS: TestAccCognitoIDPUserPool_WithLambda_email (103.62s)
--- PASS: TestAccCognitoIDPUserPool_withLambda (113.91s)

internal/service/cognitoidp/user_pool.go Show resolved Hide resolved
@gdavison gdavison merged commit bc38b95 into main Oct 11, 2022
@gdavison gdavison deleted the f-aws_cognito_user_pool-update-settings branch October 11, 2022 18:37
@github-actions github-actions bot added this to the v4.35.0 milestone Oct 11, 2022
github-actions bot pushed a commit that referenced this pull request Oct 11, 2022
@github-actions
Copy link

This functionality has been released in v4.35.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 Nov 17, 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. service/cognitoidp Issues and PRs that pertain to the cognitoidp service. service/transitgateway Issues and PRs that pertain to the transitgateway 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.

Cognito user pool settings for verification at attribute updates
2 participants