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

aws_cognito_user_pool asking for update to remove account_recovery_setting without changes #17228

Closed
5up3r20e opened this issue Jan 21, 2021 · 5 comments · Fixed by #19704
Closed
Labels
bug Addresses a defect in current functionality.
Milestone

Comments

@5up3r20e
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

terraform version: 0.14.5
aws provider version: v3.24.1

Affected Resource(s)

  • aws_cognito_user_pool

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp
resource "aws_cognito_user_pool" "name" {
  name = "<name>"
  alias_attributes = ["preferred_username"]
  auto_verified_attributes = ["email"]
  mfa_configuration = "OFF"

  password_policy {
    minimum_length = "10"
    require_uppercase = "false"
    require_lowercase = "false"
    require_numbers = "false"
    require_symbols = "false"
    temporary_password_validity_days = "2"
  }

  email_configuration {
    email_sending_account = "DEVELOPER"
    source_arn = "<arn>"
  }

  verification_message_template {
    default_email_option = "CONFIRM_WITH_CODE"
      email_subject = "Your verification code"
      email_message = "Your verification code is {####}."
  }

  admin_create_user_config {
    allow_admin_create_user_only = true

    invite_message_template {
      email_subject = "xxxx"
      email_message = "xxx\n"
      sms_message = "xxx{####}"
    }
  }

  schema {
    name    = "application_id"
    mutable = true
    required = false

    developer_only_attribute = false

    attribute_data_type = "String"
      string_attribute_constraints {
        max_length = "256"
        min_length = "1"
      }
  }
  }

}

Debug Output

Panic Output

~ update in-place
Terraform will perform the following actions:

aws_cognito_user_pool.name will be updated in-place

~ resource "aws_cognito_user_pool" "clubware-logins-ap-southeast-2" {
id = "xxxx"
name = ""
tags = {}
# (9 unchanged attributes hidden)
- account_recovery_setting {
}
# (13 unchanged blocks hidden)
}

Expected Behavior

no need to show the update request
since there is no change

Actual Behavior

~ update in-place
Terraform will perform the following actions:

aws_cognito_user_pool.name will be updated in-place

~ resource "aws_cognito_user_pool" "clubware-logins-ap-southeast-2" {
id = "xxxx"
name = ""
tags = {}
# (9 unchanged attributes hidden)
- account_recovery_setting {
}
# (13 unchanged blocks hidden)
}

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@ghost ghost added the service/cognito label Jan 21, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 21, 2021
@andyli
Copy link

andyli commented Jan 28, 2021

This issue appears since 3.19.0.

@grayaii
Copy link
Contributor

grayaii commented Feb 10, 2021

Is there any workaround? I tried fiddling with the remote state, and nothing I do seems to fix this.
I tried setting in the remote state:
"account_recovery_setting": null,
or
"account_recovery_setting": {},
But nothing. It always wants to remove it when running a plan:

- account_recovery_setting {
}

@andyli
Copy link

andyli commented Feb 11, 2021

I just pinned the version of the aws provider...

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "3.18.0" # https://github.com/hashicorp/terraform-provider-aws/issues/17228
    }
}

@DrFaust92 DrFaust92 added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 7, 2021
@anGie44 anGie44 added this to the v3.45.0 milestone Jun 10, 2021
@github-actions
Copy link

This functionality has been released in v3.45.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 issue 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 similar to this, 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 Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality.
Projects
None yet
5 participants