serverless-iam-roles-per-function icon indicating copy to clipboard operation
serverless-iam-roles-per-function copied to clipboard

Added supported for iamManagedPolicies

Open emilhdiaz opened this issue 6 years ago • 16 comments

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.

emilhdiaz avatar Feb 21 '19 03:02 emilhdiaz

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 Coverage Status
Change from base Build 71: -2.1%
Covered Lines: 119
Relevant Lines: 130

💛 - Coveralls

coveralls avatar Feb 21 '19 03:02 coveralls

Thanks for contributing. Can you also add a small unit test to verify this feature.

glicht avatar Feb 25 '19 21:02 glicht

Sure thing. I'll add the unit tests this week.

emilhdiaz avatar Mar 04 '19 03:03 emilhdiaz

@emilhdiaz Are you still working on this? I'm interested in the same feature, I might be able to finish this PR if needed.

christophgysin avatar Apr 24 '19 10:04 christophgysin

Again is this being worked on still? Would be awesome to have this feature!

josephjohansson avatar Jun 07 '19 01:06 josephjohansson

It seems to be stuck. Open for contributions on this.

glicht avatar Jun 07 '19 19:06 glicht

My apologies, I'll try to pick this up again next week.

emilhdiaz avatar Jun 29 '19 05:06 emilhdiaz

Hi @emilhdiaz, Any progress on this? Happy to help if needed, I'd love to see this merged.

ChristopheBougere avatar Jul 29 '19 12:07 ChristopheBougere

@ChristopheBougere TBH haven't had a chance to get back to this. Would welcome the help to finally push this out.

emilhdiaz avatar Aug 30 '19 16:08 emilhdiaz

what is missing to merge it?

rfranco avatar Nov 22 '19 22:11 rfranco

I would also love to see this feature!

Jamesargy6 avatar Jan 15 '20 19:01 Jamesargy6

@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?

jaydg avatar Feb 19 '20 13:02 jaydg

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.

AdrieanKhisbe avatar May 29 '20 15:05 AdrieanKhisbe

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 =)

AdrieanKhisbe avatar Sep 11 '20 13:09 AdrieanKhisbe

: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

AdrieanKhisbe avatar Jan 15 '21 13:01 AdrieanKhisbe

(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:)

AdrieanKhisbe avatar Jan 15 '21 13:01 AdrieanKhisbe