Skip to content

Commit

Permalink
IAM Role Removal Does Not Require Removal of Permission Boundary (ans…
Browse files Browse the repository at this point in the history
…ible-collections#961)

IAM Role Removal Does Not Require Removal of Permission Boundary

SUMMARY

Removes unnecessary removal of permission boundary from a role when deleting a role. Unlike inline policies, permission boundaries do not need to be removed from an IAM role before deleting the IAM role. This behavior causes issues when a permission boundary is inherited that prevents removal of the permission boundary.
Fixes ansible-collections#959

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME
iam_role

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell <None>
  • Loading branch information
phene authored and abikouo committed Sep 18, 2023
1 parent b3007c4 commit 76ae5ce
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions iam_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,8 @@ def destroy_role():
# Before we try to delete the role we need to remove any
# - attached instance profiles
# - attached managed policies
# - permissions boundary
remove_instance_profiles(role_params, role)
update_managed_policies(role_params, role, [], True)
update_role_permissions_boundary(boundary_params, role)

try:
if not module.check_mode:
Expand Down

0 comments on commit 76ae5ce

Please sign in to comment.