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: fix empty string_attribute_constraints on user_pool attribute creates no-op update that results in a failure when applied #20386

Merged
merged 4 commits into from
Oct 11, 2024

Conversation

GavinWu1991
Copy link
Contributor

@GavinWu1991 GavinWu1991 commented Jul 31, 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 #20276
Closes #37687

Output from acceptance testing:

make testacc TESTARGS='-run=TestAccAWSCognitoUserPool_*'               
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSCognitoUserPool_* -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
=== RUN   TestAccAWSCognitoUserPoolDomain_basic
=== PAUSE TestAccAWSCognitoUserPoolDomain_basic
=== RUN   TestAccAWSCognitoUserPoolDomain_custom
    resource_aws_acm_certificate_test.go:88: Environment variable ACM_CERTIFICATE_ROOT_DOMAIN is not set. For DNS validation requests, this domain must be publicly accessible and configurable via Route53 during the testing. For email validation requests, you must have access to one of the five standard email addresses used (admin|administrator|hostmaster|postmaster|webmaster)@domain or one of the WHOIS contact addresses.
--- SKIP: TestAccAWSCognitoUserPoolDomain_custom (0.00s)
=== RUN   TestAccAWSCognitoUserPoolDomain_disappears
=== PAUSE TestAccAWSCognitoUserPoolDomain_disappears
=== RUN   TestAccAWSCognitoUserPool_basic
=== PAUSE TestAccAWSCognitoUserPool_basic
=== RUN   TestAccAWSCognitoUserPool_recovery
=== PAUSE TestAccAWSCognitoUserPool_recovery
=== RUN   TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration
=== PAUSE TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration
=== RUN   TestAccAWSCognitoUserPool_withAdminCreateUserConfigurationAndPasswordPolicy
=== PAUSE TestAccAWSCognitoUserPool_withAdminCreateUserConfigurationAndPasswordPolicy
=== RUN   TestAccAWSCognitoUserPool_withAdvancedSecurityMode
=== PAUSE TestAccAWSCognitoUserPool_withAdvancedSecurityMode
=== RUN   TestAccAWSCognitoUserPool_withDeviceConfiguration
=== PAUSE TestAccAWSCognitoUserPool_withDeviceConfiguration
=== RUN   TestAccAWSCognitoUserPool_withEmailVerificationMessage
=== PAUSE TestAccAWSCognitoUserPool_withEmailVerificationMessage
=== RUN   TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfiguration
=== PAUSE TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfiguration
=== RUN   TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfigurationAndSoftwareTokenMfaConfiguration
=== PAUSE TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfigurationAndSoftwareTokenMfaConfiguration
=== RUN   TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfigurationToSoftwareTokenMfaConfiguration
=== PAUSE TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfigurationToSoftwareTokenMfaConfiguration
=== RUN   TestAccAWSCognitoUserPool_MfaConfiguration_SoftwareTokenMfaConfiguration
=== PAUSE TestAccAWSCognitoUserPool_MfaConfiguration_SoftwareTokenMfaConfiguration
=== RUN   TestAccAWSCognitoUserPool_MfaConfiguration_SoftwareTokenMfaConfigurationToSmsConfiguration
=== PAUSE TestAccAWSCognitoUserPool_MfaConfiguration_SoftwareTokenMfaConfigurationToSmsConfiguration
=== RUN   TestAccAWSCognitoUserPool_SmsAuthenticationMessage
=== PAUSE TestAccAWSCognitoUserPool_SmsAuthenticationMessage
=== RUN   TestAccAWSCognitoUserPool_SmsConfiguration
=== PAUSE TestAccAWSCognitoUserPool_SmsConfiguration
=== RUN   TestAccAWSCognitoUserPool_SmsConfiguration_ExternalId
=== PAUSE TestAccAWSCognitoUserPool_SmsConfiguration_ExternalId
=== RUN   TestAccAWSCognitoUserPool_SmsConfiguration_SnsCallerArn
=== PAUSE TestAccAWSCognitoUserPool_SmsConfiguration_SnsCallerArn
=== RUN   TestAccAWSCognitoUserPool_SmsVerificationMessage
=== PAUSE TestAccAWSCognitoUserPool_SmsVerificationMessage
=== RUN   TestAccAWSCognitoUserPool_withEmailConfiguration
=== PAUSE TestAccAWSCognitoUserPool_withEmailConfiguration
=== RUN   TestAccAWSCognitoUserPool_withEmailConfigurationSource
    resource_aws_cognito_user_pool_test.go:799: 'TEST_AWS_SES_VERIFIED_EMAIL_ARN' not set, skipping test.
--- SKIP: TestAccAWSCognitoUserPool_withEmailConfigurationSource (0.00s)
=== RUN   TestAccAWSCognitoUserPool_withTags
=== PAUSE TestAccAWSCognitoUserPool_withTags
=== RUN   TestAccAWSCognitoUserPool_withAliasAttributes
=== PAUSE TestAccAWSCognitoUserPool_withAliasAttributes
=== RUN   TestAccAWSCognitoUserPool_withUsernameAttributes
=== PAUSE TestAccAWSCognitoUserPool_withUsernameAttributes
=== RUN   TestAccAWSCognitoUserPool_withPasswordPolicy
=== PAUSE TestAccAWSCognitoUserPool_withPasswordPolicy
=== RUN   TestAccAWSCognitoUserPool_withUsernameConfiguration
=== PAUSE TestAccAWSCognitoUserPool_withUsernameConfiguration
=== RUN   TestAccAWSCognitoUserPool_withLambdaConfig
=== PAUSE TestAccAWSCognitoUserPool_withLambdaConfig
=== RUN   TestAccAWSCognitoUserPool_withLambdaConfig_emailConfig
=== PAUSE TestAccAWSCognitoUserPool_withLambdaConfig_emailConfig
=== RUN   TestAccAWSCognitoUserPool_withLambdaConfig_smsConfig
=== PAUSE TestAccAWSCognitoUserPool_withLambdaConfig_smsConfig
=== RUN   TestAccAWSCognitoUserPool_schemaAttributes
=== PAUSE TestAccAWSCognitoUserPool_schemaAttributes
=== RUN   TestAccAWSCognitoUserPool_schemaAttributesRemoved
=== PAUSE TestAccAWSCognitoUserPool_schemaAttributesRemoved
=== RUN   TestAccAWSCognitoUserPool_schemaAttributesModified
=== PAUSE TestAccAWSCognitoUserPool_schemaAttributesModified
=== RUN   TestAccAWSCognitoUserPool_withVerificationMessageTemplate
=== PAUSE TestAccAWSCognitoUserPool_withVerificationMessageTemplate
=== RUN   TestAccAWSCognitoUserPool_update
=== PAUSE TestAccAWSCognitoUserPool_update
=== RUN   TestAccAWSCognitoUserPool_disappears
=== PAUSE TestAccAWSCognitoUserPool_disappears
=== RUN   TestAccAWSCognitoUserPoolUICustomization_AllClients_CSS
=== PAUSE TestAccAWSCognitoUserPoolUICustomization_AllClients_CSS
=== RUN   TestAccAWSCognitoUserPoolUICustomization_AllClients_Disappears
=== PAUSE TestAccAWSCognitoUserPoolUICustomization_AllClients_Disappears
=== RUN   TestAccAWSCognitoUserPoolUICustomization_AllClients_ImageFile
=== PAUSE TestAccAWSCognitoUserPoolUICustomization_AllClients_ImageFile
=== RUN   TestAccAWSCognitoUserPoolUICustomization_AllClients_CSSAndImageFile
=== PAUSE TestAccAWSCognitoUserPoolUICustomization_AllClients_CSSAndImageFile
=== RUN   TestAccAWSCognitoUserPoolUICustomization_Client_CSS
=== PAUSE TestAccAWSCognitoUserPoolUICustomization_Client_CSS
=== RUN   TestAccAWSCognitoUserPoolUICustomization_Client_Disappears
=== PAUSE TestAccAWSCognitoUserPoolUICustomization_Client_Disappears
=== RUN   TestAccAWSCognitoUserPoolUICustomization_Client_Image
=== PAUSE TestAccAWSCognitoUserPoolUICustomization_Client_Image
=== RUN   TestAccAWSCognitoUserPoolUICustomization_ClientAndAll_CSS
=== PAUSE TestAccAWSCognitoUserPoolUICustomization_ClientAndAll_CSS
=== RUN   TestAccAWSCognitoUserPoolUICustomization_UpdateClientToAll_CSS
=== PAUSE TestAccAWSCognitoUserPoolUICustomization_UpdateClientToAll_CSS
=== RUN   TestAccAWSCognitoUserPoolUICustomization_UpdateAllToClient_CSS
=== PAUSE TestAccAWSCognitoUserPoolUICustomization_UpdateAllToClient_CSS
=== CONT  TestAccAWSCognitoUserPoolClient_basic
=== CONT  TestAccAWSCognitoUserPool_SmsConfiguration
=== CONT  TestAccAWSCognitoUserPoolDomain_disappears
=== CONT  TestAccAWSCognitoUserPoolUICustomization_Client_Disappears
=== CONT  TestAccAWSCognitoUserPool_withLambdaConfig
=== CONT  TestAccAWSCognitoUserPool_withAliasAttributes
=== CONT  TestAccAWSCognitoUserPool_withTags
=== CONT  TestAccAWSCognitoUserPool_withEmailConfiguration
=== CONT  TestAccAWSCognitoUserPool_SmsVerificationMessage
=== CONT  TestAccAWSCognitoUserPool_SmsConfiguration_SnsCallerArn
=== CONT  TestAccAWSCognitoUserPool_schemaAttributesModified
=== CONT  TestAccAWSCognitoUserPoolUICustomization_UpdateAllToClient_CSS
=== CONT  TestAccAWSCognitoUserPoolUICustomization_UpdateClientToAll_CSS
=== CONT  TestAccAWSCognitoUserPoolUICustomization_ClientAndAll_CSS
=== CONT  TestAccAWSCognitoUserPool_SmsConfiguration_ExternalId
=== CONT  TestAccAWSCognitoUserPoolUICustomization_Client_Image
=== CONT  TestAccAWSCognitoUserPool_withUsernameAttributes
=== CONT  TestAccAWSCognitoUserPool_withLambdaConfig_emailConfig
=== CONT  TestAccAWSCognitoUserPool_withPasswordPolicy
=== CONT  TestAccAWSCognitoUserPool_withLambdaConfig_smsConfig
--- PASS: TestAccAWSCognitoUserPoolDomain_disappears (104.52s)
=== CONT  TestAccAWSCognitoUserPool_SmsAuthenticationMessage
--- PASS: TestAccAWSCognitoUserPool_schemaAttributesModified (106.17s)
=== CONT  TestAccAWSCognitoUserPool_MfaConfiguration_SoftwareTokenMfaConfigurationToSmsConfiguration
--- PASS: TestAccAWSCognitoUserPool_withEmailConfiguration (107.97s)
=== CONT  TestAccAWSCognitoUserPool_MfaConfiguration_SoftwareTokenMfaConfiguration
--- PASS: TestAccAWSCognitoUserPoolClient_basic (122.22s)
=== CONT  TestAccAWSCognitoUserPoolUICustomization_AllClients_Disappears
--- PASS: TestAccAWSCognitoUserPoolUICustomization_Client_Disappears (128.27s)
=== CONT  TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfigurationToSoftwareTokenMfaConfiguration
--- PASS: TestAccAWSCognitoUserPool_SmsVerificationMessage (139.02s)
=== CONT  TestAccAWSCognitoUserPoolUICustomization_Client_CSS
--- PASS: TestAccAWSCognitoUserPool_withAliasAttributes (147.02s)
=== CONT  TestAccAWSCognitoUserPoolUICustomization_AllClients_CSSAndImageFile
--- PASS: TestAccAWSCognitoUserPool_withUsernameAttributes (151.36s)
=== CONT  TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfigurationAndSoftwareTokenMfaConfiguration
--- PASS: TestAccAWSCognitoUserPoolUICustomization_Client_Image (163.13s)
=== CONT  TestAccAWSCognitoUserPoolUICustomization_AllClients_ImageFile
--- PASS: TestAccAWSCognitoUserPool_withPasswordPolicy (163.84s)
=== CONT  TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfiguration
--- PASS: TestAccAWSCognitoUserPoolUICustomization_UpdateClientToAll_CSS (180.03s)
=== CONT  TestAccAWSCognitoUserPool_schemaAttributesRemoved
--- PASS: TestAccAWSCognitoUserPoolUICustomization_UpdateAllToClient_CSS (190.18s)
=== CONT  TestAccAWSCognitoUserPool_withUsernameConfiguration
--- PASS: TestAccAWSCognitoUserPoolUICustomization_ClientAndAll_CSS (200.28s)
=== CONT  TestAccAWSCognitoUserPoolClient_allFields
--- PASS: TestAccAWSCognitoUserPoolUICustomization_AllClients_Disappears (83.20s)
=== CONT  TestAccAWSCognitoUserPoolDomain_basic
--- PASS: TestAccAWSCognitoUserPool_SmsConfiguration_ExternalId (206.58s)
=== CONT  TestAccAWSCognitoUserPoolClient_disappears_userPool
--- PASS: TestAccAWSCognitoUserPool_SmsConfiguration_SnsCallerArn (206.99s)
=== CONT  TestAccAWSCognitoUserPoolClient_disappears
--- PASS: TestAccAWSCognitoUserPool_withLambdaConfig (215.59s)
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn
--- PASS: TestAccAWSCognitoUserPool_withTags (215.86s)
=== CONT  TestAccAWSCognitoUserPool_withEmailVerificationMessage
--- PASS: TestAccAWSCognitoUserPool_SmsConfiguration (227.18s)
=== CONT  TestAccAWSCognitoUserPoolClient_analyticsConfig
--- PASS: TestAccAWSCognitoUserPool_withLambdaConfig_smsConfig (229.36s)
=== CONT  TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration
--- PASS: TestAccAWSCognitoUserPool_SmsAuthenticationMessage (134.80s)
=== CONT  TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
--- PASS: TestAccAWSCognitoUserPool_withLambdaConfig_emailConfig (244.82s)
=== CONT  TestAccAWSCognitoUserPool_recovery
--- PASS: TestAccAWSCognitoUserPool_MfaConfiguration_SoftwareTokenMfaConfigurationToSmsConfiguration (147.50s)
=== CONT  TestAccAWSCognitoUserPool_schemaAttributes
--- PASS: TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfigurationToSoftwareTokenMfaConfiguration (139.35s)
=== CONT  TestAccAWSCognitoUserPool_basic
=== CONT  TestAccAWSCognitoUserPoolClient_idTokenValidity
--- PASS: TestAccAWSCognitoUserPool_MfaConfiguration_SoftwareTokenMfaConfiguration (160.31s)
--- PASS: TestAccAWSCognitoUserPool_schemaAttributesRemoved (89.22s)
=== CONT  TestAccAWSCognitoUserPoolClient_Name
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (72.41s)
=== CONT  TestAccAWSCognitoUserPool_disappears
--- PASS: TestAccAWSCognitoUserPoolUICustomization_Client_CSS (144.22s)
=== CONT  TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity
--- PASS: TestAccAWSCognitoUserPoolClient_disappears (76.72s)
=== CONT  TestAccAWSCognitoUserPoolUICustomization_AllClients_CSS
--- PASS: TestAccAWSCognitoUserPoolDomain_basic (82.42s)
=== CONT  TestAccAWSCognitoUserPoolClient_tokenValidityUnits
--- PASS: TestAccAWSCognitoUserPoolClient_disappears_userPool (88.34s)
=== CONT  TestAccAWSCognitoUserPool_withAdvancedSecurityMode
--- PASS: TestAccAWSCognitoUserPoolUICustomization_AllClients_ImageFile (140.89s)
=== CONT  TestAccAWSCognitoUserPool_withDeviceConfiguration
--- PASS: TestAccAWSCognitoUserPool_withUsernameConfiguration (120.73s)
=== CONT  TestAccAWSCognitoUserPool_withVerificationMessageTemplate
--- PASS: TestAccAWSCognitoUserPoolClient_analyticsConfigWithArn (98.00s)
=== CONT  TestAccAWSCognitoUserPool_withAdminCreateUserConfigurationAndPasswordPolicy
--- PASS: TestAccAWSCognitoUserPool_disappears (55.97s)
=== CONT  TestAccAWSCognitoUserPool_update
--- PASS: TestAccAWSCognitoUserPool_withEmailVerificationMessage (123.66s)
=== CONT  TestAccAWSCognitoUserPoolClient_accessTokenValidity
--- PASS: TestAccAWSCognitoUserPoolUICustomization_AllClients_CSSAndImageFile (192.65s)
=== CONT  TestAccAWSCognitoUserPoolClient_enableRevocation
--- PASS: TestAccAWSCognitoUserPool_basic (75.40s)
=== CONT  TestAccAWSCognitoUserPoolClient_refreshTokenValidity
--- PASS: TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfigurationAndSoftwareTokenMfaConfiguration (195.73s)
--- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration (122.60s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (114.99s)
--- PASS: TestAccAWSCognitoUserPool_schemaAttributes (105.89s)
--- PASS: TestAccAWSCognitoUserPool_MfaConfiguration_SmsConfiguration (209.69s)
--- PASS: TestAccAWSCognitoUserPoolClient_idTokenValidity (105.78s)
--- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfigurationAndPasswordPolicy (65.79s)
--- PASS: TestAccAWSCognitoUserPool_recovery (143.01s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (120.47s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnitsWTokenValidity (113.15s)
--- PASS: TestAccAWSCognitoUserPool_withDeviceConfiguration (95.83s)
--- PASS: TestAccAWSCognitoUserPoolClient_tokenValidityUnits (116.12s)
--- PASS: TestAccAWSCognitoUserPoolUICustomization_AllClients_CSS (126.02s)
--- PASS: TestAccAWSCognitoUserPoolClient_analyticsConfig (185.87s)
--- PASS: TestAccAWSCognitoUserPool_withVerificationMessageTemplate (106.19s)
--- PASS: TestAccAWSCognitoUserPool_withAdvancedSecurityMode (132.46s)
--- PASS: TestAccAWSCognitoUserPoolClient_enableRevocation (120.59s)
--- PASS: TestAccAWSCognitoUserPoolClient_accessTokenValidity (130.70s)
--- PASS: TestAccAWSCognitoUserPoolClient_refreshTokenValidity (132.98s)
--- PASS: TestAccAWSCognitoUserPool_update (164.91s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       495.469s

@github-actions github-actions bot added service/cognito tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. size/M Managed by automation to categorize the size of a PR. labels Jul 31, 2021
@GavinWu1991 GavinWu1991 changed the title r/aws_cognito_user_pool: Empty string_attribute_constraints on user_pool attribute creates no-op update that results in a failure when applied #20276 r/aws_cognito_user_pool: fix empty string_attribute_constraints on user_pool attribute creates no-op update that results in a failure when applied Jul 31, 2021
@GavinWu1991 GavinWu1991 marked this pull request as ready for review July 31, 2021 13:04
@breathingdust breathingdust added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 31, 2021
@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

@DrFaust92 DrFaust92 added the service/cognitoidp Issues and PRs that pertain to the cognitoidp service. label Jun 11, 2022
@github-actions github-actions bot added the pre-service-packages Includes pre-Service Packages aspects. label May 28, 2024
kuzaxak added a commit to kuzaxak/terraform-provider-aws that referenced this pull request Aug 31, 2024
…_pool

Fixing bug when empty string_attribute_constraints on user_pool attribute creates no-op update that results in a failure when applied

Rebase for [PR][1]

Closes hashicorp#20276
Closes hashicorp#37687

[1]: hashicorp#20386
@gdavison gdavison self-assigned this Oct 11, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 11, 2024
@gdavison gdavison requested a review from a team as a code owner October 11, 2024 19:37
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.

Thanks for the PR, @GavinWu1991 🚀

@gdavison gdavison merged commit 8a48755 into hashicorp:main Oct 11, 2024
34 checks passed
@github-actions github-actions bot added this to the v5.72.0 milestone Oct 11, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 15, 2024
Copy link

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

@kuzaxak
Copy link

kuzaxak commented Oct 16, 2024

@GavinWu1991 @gdavison I think the fix didn't cover the existing state and made it broken.

I have the following in my state file:

{
  "attribute_data_type": "String",
  "developer_only_attribute": false,
  "mutable": true,
  "name": "custom:domains",
  "number_attribute_constraints": [],
  "required": false,
  "string_attribute_constraints": [
    {
      "max_length": null,
      "min_length": null
    }
  ]
},

And now I have a permanent diff that can't be applied:

 - schema {
    - attribute_data_type      = "String" -> null
    - developer_only_attribute = false -> null
    - mutable                  = true -> null
    - name                     = "custom:domains" -> null
    - required                 = false -> null

    - string_attribute_constraints {}
  }
 + schema {
  + attribute_data_type      = "String"
  + developer_only_attribute = false
  + mutable                  = true
  + name                     = "custom:domains"
  + required                 = false

  + string_attribute_constraints {
        # (2 unchanged attributes hidden)
    }
}

In the code, I tried to use the following:

  • string_attribute_constraints: null
  • string_attribute_constraints: {max_length: null}

Nothing from that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. pre-service-packages Includes pre-Service Packages aspects. 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
7 participants