-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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 unused_account_validity_days bug with 2.47 #11858
Comments
From what I've noticed the aws-provider reports the existence of the |
Also getting this with TF 0.12.18 and AWS provider 2.47, guessing it's because the old attribute is still in the state. |
@nickdgriffin I thought so, I tried to pull (terraform pull) and repush (terraform push) the state dropping the keyword "unused_account_validity_days" |
I am also seeing this issues. 12.18 and provider 2.47 In the mean time i am getting around it with this:
|
@nickdgriffin I thought the same, but also had this on a completely new state (had several environments to set up, coincidentally :) ) |
Temporary solution for the fixing bug hashicorp/terraform-provider-aws#11858
See #10890 for wider context, this is AWS API. |
Ah, looks like the |
…uration block unused_account_validity_days to be omitted Reference: #11858 Reference: #10890 There was previously no test configuration covering both admin_create_user_config and password_policy being defined. The upstream API has deprecated a field in the former, however if the configuration block was defined, the attribute would errantly show a difference on the deprecated field. Previous output from acceptance testing (before code fix): ``` --- FAIL: TestAccAWSCognitoUserPool_withAdminCreateUserConfigurationAndPasswordPolicy (13.28s) testing.go:640: Step 0 error: After applying this step, the plan was not empty: DIFF: UPDATE: aws_cognito_user_pool.test admin_create_user_config.#: "1" => "1" admin_create_user_config.0.allow_admin_create_user_only: "true" => "true" admin_create_user_config.0.invite_message_template.#: "0" => "0" admin_create_user_config.0.unused_account_validity_days: "7" => "" ... omitted for clarity ... ``` Output from acceptance testing: ``` --- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfigurationAndPasswordPolicy (18.41s) --- PASS: TestAccAWSCognitoUserPool_basic (18.46s) --- PASS: TestAccAWSCognitoUserPool_withAliasAttributes (27.92s) --- PASS: TestAccAWSCognitoUserPool_withPasswordPolicy (29.64s) --- PASS: TestAccAWSCognitoUserPool_withVerificationMessageTemplate (29.68s) --- PASS: TestAccAWSCognitoUserPool_withDeviceConfiguration (30.52s) --- PASS: TestAccAWSCognitoUserPool_withEmailVerificationMessage (31.38s) --- PASS: TestAccAWSCognitoUserPool_withSmsVerificationMessage (32.67s) --- PASS: TestAccAWSCognitoUserPool_withSchemaAttributes (33.39s) --- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration (37.94s) --- PASS: TestAccAWSCognitoUserPool_withAdvancedSecurityMode (39.71s) --- PASS: TestAccAWSCognitoUserPool_withTags (44.33s) --- PASS: TestAccAWSCognitoUserPool_withSmsConfiguration (50.12s) --- PASS: TestAccAWSCognitoUserPool_withSmsConfigurationUpdated (51.37s) --- PASS: TestAccAWSCognitoUserPool_update (66.06s) --- PASS: TestAccAWSCognitoUserPool_withLambdaConfig (75.15s) ```
Fix submitted: #12001 |
…uration block unused_account_validity_days to be omitted (#12001) Reference: #11858 Reference: #10890 There was previously no test configuration covering both admin_create_user_config and password_policy being defined. The upstream API has deprecated a field in the former, however if the configuration block was defined, the attribute would errantly show a difference on the deprecated field. Previous output from acceptance testing (before code fix): ``` --- FAIL: TestAccAWSCognitoUserPool_withAdminCreateUserConfigurationAndPasswordPolicy (13.28s) testing.go:640: Step 0 error: After applying this step, the plan was not empty: DIFF: UPDATE: aws_cognito_user_pool.test admin_create_user_config.#: "1" => "1" admin_create_user_config.0.allow_admin_create_user_only: "true" => "true" admin_create_user_config.0.invite_message_template.#: "0" => "0" admin_create_user_config.0.unused_account_validity_days: "7" => "" ... omitted for clarity ... ``` Output from acceptance testing: ``` --- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfigurationAndPasswordPolicy (18.41s) --- PASS: TestAccAWSCognitoUserPool_basic (18.46s) --- PASS: TestAccAWSCognitoUserPool_withAliasAttributes (27.92s) --- PASS: TestAccAWSCognitoUserPool_withPasswordPolicy (29.64s) --- PASS: TestAccAWSCognitoUserPool_withVerificationMessageTemplate (29.68s) --- PASS: TestAccAWSCognitoUserPool_withDeviceConfiguration (30.52s) --- PASS: TestAccAWSCognitoUserPool_withEmailVerificationMessage (31.38s) --- PASS: TestAccAWSCognitoUserPool_withSmsVerificationMessage (32.67s) --- PASS: TestAccAWSCognitoUserPool_withSchemaAttributes (33.39s) --- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration (37.94s) --- PASS: TestAccAWSCognitoUserPool_withAdvancedSecurityMode (39.71s) --- PASS: TestAccAWSCognitoUserPool_withTags (44.33s) --- PASS: TestAccAWSCognitoUserPool_withSmsConfiguration (50.12s) --- PASS: TestAccAWSCognitoUserPool_withSmsConfigurationUpdated (51.37s) --- PASS: TestAccAWSCognitoUserPool_update (66.06s) --- PASS: TestAccAWSCognitoUserPool_withLambdaConfig (75.15s) ```
The fix for this has been merged and will release with version 2.49.0 of the Terraform AWS Provider, tomorrow. 👍 |
This has been released in version 2.49.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 for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Terraform v0.12.20
Provider AWS 2.47
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/alemazz/e7f72c95f47405107ff1c8686f10b611
Panic Output
Expected Behavior
Terraform report a clean plan/apply with new value "temporary_password_validity_days = 90"
Actual Behavior
Terraform keep re add the old configuration with deprecated value "unused_account_validity_days"
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: