serverless-iam-roles-per-function
serverless-iam-roles-per-function copied to clipboard
Added supported for iamManagedPolicies
This PR adds support for iamManagedPolicies
at the provider and function level.
I took the liberty to reorganize a small section of the code to make the createRoleForFunction
method easier to follow.
Happy to make edits to the documentation and unit tests if you agree with the general approach here.
Pull Request Test Coverage Report for Build 73
- 31 of 36 (86.11%) changed or added relevant lines in 1 file are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-2.1%) to 90.541%
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
---|---|---|---|
src/lib/index.ts | 31 | 36 | 86.11% |
<!-- | Total: | 31 | 36 |
Totals | |
---|---|
Change from base Build 71: | -2.1% |
Covered Lines: | 119 |
Relevant Lines: | 130 |
💛 - Coveralls
Thanks for contributing. Can you also add a small unit test to verify this feature.
Sure thing. I'll add the unit tests this week.
@emilhdiaz Are you still working on this? I'm interested in the same feature, I might be able to finish this PR if needed.
Again is this being worked on still? Would be awesome to have this feature!
It seems to be stuck. Open for contributions on this.
My apologies, I'll try to pick this up again next week.
Hi @emilhdiaz, Any progress on this? Happy to help if needed, I'd love to see this merged.
@ChristopheBougere TBH haven't had a chance to get back to this. Would welcome the help to finally push this out.
what is missing to merge it?
I would also love to see this feature!
@ChristopheBougere TBH haven't had a chance to get back to this. Would welcome the help to finally push this out.
@emilhdiaz there is a MR against your MR wich adds the missing test. Could you please look into it?
Hello @glicht being really interested by the iamManagedPolicies support, I took care to refresh the stalled work from @emilhdiaz
I rebased it on top of master, solved conflict and added tests for the feature, here is a preview:
- 🌳 branch and diff: https://github.com/functionalone/serverless-iam-roles-per-function/compare/master...AdrieanKhisbe:add-support-for-iam-managed-policies
- 🚥 CI: https://travis-ci.com/github/AdrieanKhisbe/serverless-iam-roles-per-function/builds/168771575.
- :shield: https://coveralls.io/builds/31120000
Would you prefer that I open another PR or do you have an alternative in mind?
Note that CI on latests serverless is broken, this is linked to this PR: https://github.com/serverless/serverless/pull/7722/files
But not sure you how to adapt ensure global role is present
test correctly.
Hello @glicht and all,
Trying my chance again, I have a working version that handles iamManagedPolicies
Currently made a fully function fork there CoorpAcademy/serverless-granular-iam :octopus: + serverless-granular-iam :package:, and using it. Though I think it's better to have changes incorporated into original code base and for being discontinued.
So, I'm just waiting for you to tell me how I should submit the changes (new pull request or else) :grey_question:
Best regards =)
:wave: Hello @glicht & @Enase
I reiterate my proposal to update the Pr, to make it work on serverless v2 now that the plugin has been recently adapted to support that.
As stated, CoorpAcademy/serverless-granular-iam :octopus: + serverless-granular-iam :package: is not intended to be persistent, and it would be far better that the feature lands in the repo.
Please tell me what course of action you would prefer. I can for instance rebase and adapt on current v3 and open a dedicated Pull request.
Best regards
(ps: and I just saw #60 by @nl-brett-stime, didn't saw earlier as no notification received as @
handle was forgottent :see_no_evil:)