Skip to content

Commit

Permalink
iam_user - Add support for setting path and boundary policy (#1912) (#…
Browse files Browse the repository at this point in the history
…1915)

[PR #1912/588ffa21 backport][stable-7] iam_user - Add support for setting path and boundary policy

This is a backport of PR #1912 as merged into main (588ffa2).
SUMMARY
Add support for setting path and boundary policy

Code refactor to reduce complexity
Adds support for setting path
Adds support for setting boundary policy
returns attached_policies

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
iam_user
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell
  • Loading branch information
patchback[bot] authored Dec 9, 2023
1 parent b4ab16e commit db347c2
Show file tree
Hide file tree
Showing 12 changed files with 1,506 additions and 910 deletions.
6 changes: 6 additions & 0 deletions changelogs/fragments/20231206-iam_user_path.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
minor_changes:
- iam_user - add ``boundary`` parameter to support managing boundary policy on users (https://github.com/ansible-collections/amazon.aws/pull/1912).
- iam_user - add ``path`` parameter to support managing user path (https://github.com/ansible-collections/amazon.aws/pull/1912).
- iam_user - added ``attached_policies`` to return value (https://github.com/ansible-collections/amazon.aws/pull/1912).
- iam_user - refactored code to reduce complexity (https://github.com/ansible-collections/amazon.aws/pull/1912).
2 changes: 1 addition & 1 deletion plugins/module_utils/iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def convert_managed_policy_names_to_arns(client, policy_names):
try:
return [allpolicies[policy] for policy in policy_names if policy is not None]
except KeyError as e:
raise AnsibleIAMError(message="Failed to find policy by name:" + str(e))
raise AnsibleIAMError(message="Failed to find policy by name:" + str(e), exception=e)


def get_aws_account_id(module):
Expand Down
Loading

0 comments on commit db347c2

Please sign in to comment.