-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 with force_destroy should also get rid of SSH keys #4176
Comments
FWIW there's at least one other case that I can't file a bug for yet because I haven't figured it out:
As you can tell this user doesn't even have an SSH key and still can't be deleted. No idea why. |
Despite forgetting it in that paste: it's also not an attached MFA device. |
The fix for deleting SSH keys with |
This has been released in version 1.43.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Output
Output of terraform destroy:
Expected Behavior
The user should have been destroyed
Actual Behavior
The user was not destroyed
Steps to Reproduce
terraform init
terraform apply
aws upload-ssh-public-key --user-name u --ssh-public-key-body $(cat ~/.ssh/id_rsa.pub)
terraform destroy
Additional Context
Unfortunately, while the
DeleteUser
IAM command claims to produce useful info about the conflicting resources when a delete fails. I have not found this to be true, making this bug all the more frustrating.References
None that I know of.
The text was updated successfully, but these errors were encountered: