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_iam_user_login_profile does not taint/recreate properly #4412

Closed
sfdc-jd opened this issue May 1, 2018 · 2 comments
Closed

aws_iam_user_login_profile does not taint/recreate properly #4412

sfdc-jd opened this issue May 1, 2018 · 2 comments
Labels
bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service.

Comments

@sfdc-jd
Copy link

sfdc-jd commented May 1, 2018

Terraform Version

Terraform v0.11.7

  • provider.aws v1.14.1

Affected Resource(s)

  • aws_iam_user_login_profile

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "aws_iam_user" "main" {
  name          = "${var.username}"
  path          = "/staff/${var.memberof}/"
  force_destroy = true
}

resource "aws_iam_user_login_profile" "main" {
  user                    = "${aws_iam_user.main.name}"
  password_reset_required = true
  pgp_key                 = "${var.pgp_key}"
}

resource "aws_iam_user_policy_attachment" "minimum" {
  user       = "${aws_iam_user.main.name}"
  policy_arn = "${var.base_policy_arn}"
}

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

When the user resource and login profile is tainted or completely deleted, the login profile should be recreated.

Actual Behavior

If the login profile is deleted, it is not recreated at all. If it is tainted, it is not re-created, but left in place.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

We are running in EC2 Classic, but this is an IAM resource.

References

@bflad bflad added bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service. labels May 1, 2018
@bflad
Copy link
Contributor

bflad commented Feb 13, 2019

Hi @sfdc-jd 👋 Sorry you ran into this unexpected behavior. I believe this issue is very similar (if not a duplicate) to #3856. To consolidate efforts and discussions, I'm going to close this issue in preference of the earlier one. Thanks for reporting this!

@bflad bflad closed this as completed Feb 13, 2019
@ghost
Copy link

ghost commented Apr 1, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
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
Development

No branches or pull requests

2 participants