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

Resource aws_iam_user_login_profile "forces replacement" after upgrade to aws provider v4x #23567

Closed
Arisfx opened this issue Mar 8, 2022 · 12 comments · Fixed by #36926
Closed
Assignees
Labels
bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service.
Milestone

Comments

@Arisfx
Copy link

Arisfx commented Mar 8, 2022

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

Affected Resource(s)

  • aws_iam_user_login_profile

Hi team, as the title says, the resource aws_iam_user_login_profile breaks after the upgrade to AWS provider v4x.

While the terraform code dictates password_reset_required = true and in the state file i can see that "password_reset_required": true, (in the aws console of course its enabled).
When i am running terraform apply i get the ~ password_reset_required = false -> true # forces replacement

I understand that the upgrade to aws provider v4x is introducing many breaking changes but i wasn’t able to find anything useful in the upgrade documentation here

Terraform CLI and Terraform AWS Provider Version

P.S We are not using multiple providers, there is only 1 piece of code that this provider is declared:

  required_providers {
aws = {
  source  = "hashicorp/aws"
  version = "4.4.0"
 }
}

Am i missing something?
Thanks!

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/iam Issues and PRs that pertain to the iam service. labels Mar 8, 2022
@rustige
Copy link

rustige commented Mar 9, 2022

Had the same issue. Worked around it by explicitly ignoring changes on password_reset_required by lifcycle policy on the resource. Which should be the case automatically according to the manual.

Workaround:

lifecycle {
    ignore_changes = [password_reset_required]
  }

@rowleyaj
Copy link
Contributor

Is this possibly related to #12384? The default value for password_reset_required was removed and it was changed to a computed field in that PR.

I've tested 4.0.0 and this issue doesn't happen, but in 4.1.0 which included that PR the issue does happen.

cc @DrFaust92 as the PR author as I'm unsure on the context for that change

@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Mar 15, 2022
@amontalban
Copy link

I'm having the same problem, unfortunately, I am using terraform-aws-iam module and I cannot do the workaround without creating a fork.

Is this behavior expected @DrFaust92? If so, I will ask for help in terraform-aws-modules/terraform-aws-iam#244

@nikolay
Copy link

nikolay commented Aug 24, 2022

@amontalban I created terraform-aws-modules/terraform-aws-iam#271, please, 👍🏻 it - I am in the same boat, the upgrade of the AWS provider from v3 to v4 created a huge mess and locked out of AWS a bunch of people.

@bryantbiggs
Copy link
Contributor

@amontalban I created terraform-aws-modules/terraform-aws-iam#271, please, 👍🏻 it - I am in the same boat, the upgrade of the AWS provider from v3 to v4 created a huge mess and locked out of AWS a bunch of people.

This is not applicable here - this issue is asking for it to be addressed in the provider

@nikolay
Copy link

nikolay commented Aug 25, 2022

@bryantbiggs I agree. Still, it's a vastly popular module, which also does not work due to the upstream issue, which does not seem to be getting fixed anytime soon!

@fractos
Copy link

fractos commented Nov 21, 2022

Seeing this as an issue with a client. Any movement on it?

@LDVSOFT
Copy link

LDVSOFT commented Jun 28, 2023

Got hit by it today while migrating 3.x -> 4.x. This change can be worked through but needs to be documented. Don't see any movement here.

@sierra-alpha
Copy link

sierra-alpha commented Feb 13, 2024

It caught me out also, so I submitted a PR to at least update the docs. #35601

Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.46.0 milestone Apr 17, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Apr 19, 2024
Copy link

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

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 May 20, 2024
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. service/iam Issues and PRs that pertain to the iam service.
Projects
None yet