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_role.force_detach_policies no longer works #16637

Closed
aleybovich opened this issue Nov 13, 2017 · 2 comments
Closed

aws_iam_role.force_detach_policies no longer works #16637

aleybovich opened this issue Nov 13, 2017 · 2 comments

Comments

@aleybovich
Copy link

aleybovich commented Nov 13, 2017

Reproduce:

  1. Create an aws role with terraform
resource "aws_iam_role" "sample-instance-role" {
   name               = "sample-instance-role"
   path               = "/"
   force_detach_policies = true
   ... other stuff ...
}
  1. Manually add another policy to that role (e.g. via aws console)
  2. run terraform destroy

You get an error sample-instance-role: DeleteConflict: Cannot delete entity, must detach all policies first.

force_detach_policies feature has been added a few months ago specifically for this purpose - it detaches all policies that weer added outside of terraform so that the role can be deleted. This used to work briefly in one or two versions but it no longer does in 0.10.7

Documentation: https://www.terraform.io/docs/providers/aws/r/iam_role.html#force_detach_policies

@hashibot
Copy link
Contributor

This issue has been automatically migrated to hashicorp/terraform-provider-aws#2279 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to this issue and let us know.

@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 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.

@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.
Projects
None yet
Development

No branches or pull requests

3 participants