zalando-stups / sevenseconds

THIS PROJECT IS NOT LONGER ACTIVELY MAINTAINED
https://pypi.python.org/pypi/stups-sevenseconds
Other
66 stars 17 forks source link

Support attaching/detaching policies to managed roles #108

Closed aermakov-zalando closed 3 years ago

aermakov-zalando commented 3 years ago

This adds support for the attached_policies field in a role definition, which is a list of managed policy ARNs that should be attached to the role. This supports both AWS-managed policies (arn:aws:iam::aws:policy/…) and customer-managed policies using the standard {account_id} interpolation (arn:aws:iam::{account_id}:policy/…). Additionally, refactor the role management code a bit to make it slightly more clear what's going on.

Note that there's still no support for managing the policies yet, but it should be fairly easy to add in the future and could simplify our account config.

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-0.01%) to 24.238% when pulling 5ab535f83f63144d2aeb6f3719c8d899ab94412d on role-policies into d61a93d4ad2c05a0e4c387695a0cff9fa0bfded7 on master.

aermakov-zalando commented 3 years ago

👍

mikkeloscar commented 3 years ago

:+1:

codecov-io commented 3 years ago

Codecov Report

Merging #108 (5ab535f) into master (d61a93d) will decrease coverage by 0.01%. The diff coverage is 5.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #108      +/-   ##
==========================================
- Coverage   24.24%   24.23%   -0.02%     
==========================================
  Files          25       25              
  Lines        2095     2100       +5     
==========================================
+ Hits          508      509       +1     
- Misses       1587     1591       +4     
Impacted Files Coverage Δ
sevenseconds/config/iam.py 16.32% <2.94%> (+0.12%) :arrow_up:
sevenseconds/cli.py 63.49% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d61a93d...5ab535f. Read the comment docs.

aermakov-zalando commented 3 years ago

👍

mikkeloscar commented 3 years ago

:+1: