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

terraform fails when an iam user or role is renamed #213

Closed
hashibot opened this issue Jun 13, 2017 · 2 comments
Closed

terraform fails when an iam user or role is renamed #213

hashibot opened this issue Jun 13, 2017 · 2 comments
Labels
bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service.
Milestone

Comments

@hashibot
Copy link

This issue was originally opened by @justin8 as hashicorp/terraform#7939. It was migrated here as part of the provider split. The original body of the issue is below.


When renaming a role/user (probably groups as well, but I haven't tested this). It attempts to delete the old resource without detaching the policies, then returns this:

Error applying plan:

1 error(s) occurred:

* aws_iam_user.jenkins-test: Error deleting IAM User jenkins-test: DeleteConflict: Cannot delete entity, must detach all policies first.
    status code: 409, request id: 8c1f8c69-5967-11e6-b3ac-ab2eb361e21c

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

According to hashicorp/terraform#3227 it sounds like this should have already been fixed, but it doesn't seem this way.

Terraform Version

v0.6.616

References

hashicorp/terraform#3227

@hashibot hashibot added the bug Addresses a defect in current functionality. label Jun 13, 2017
@radeksimko radeksimko added the service/iam Issues and PRs that pertain to the iam service. label Jan 25, 2018
@bflad
Copy link
Contributor

bflad commented May 3, 2018

This was fixed in terraform-provider-aws version 1.7.1. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@bflad bflad closed this as completed May 3, 2018
@bflad bflad added this to the v1.7.1 milestone May 3, 2018
@ghost
Copy link

ghost commented Apr 6, 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 6, 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

3 participants