-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Cross account ECR for lambda functions #88
Conversation
I've made the changes to this MR locally and tested it, works fine. I am not sure about the changes to using the existing policy document and I'll demonstrate why below.
The above is the snippet of code that would be used if using the existing policy document. Having the code written like this in the module would produce a policy like this:
We would have duplicate statements for each item in principals_lambda. Sticking to the existing method would allow us to write the policy like so:
I've tried for a few hours to get this to loop once but just can't seem to get it, and you can't pass a true/false value into for_each nor a string, must be a list. My concern really is that the policy could grow exponentially in size hitting the AWS policy limit. If there is a way to do the dynamic statement in the existing aws_policy_document I'd love to know! |
Co-authored-by: nitrocode <nitrocode@users.noreply.github.com>
@lorengordon suggested using the length function with the dynamic statement which works perfectly. Updating MR.
|
Hey is there anything blocking this PR? I'd love to be able to use this functionality and would be happy to assist in any way if needed @r351574nc3 @florian0410 |
/test all |
please run
and commit the changes |
@dsme94 are you able to help with the above fixes? |
@jamengual @matty-rose - have pushed the new README created using make Edit: Have noticed:
Could be written better like so:
Let me know if you would like me to update |
/test all |
yes, please do |
@jamengual That's it done 👍 |
/test all |
what
why
references
https://aws.amazon.com/blogs/compute/introducing-cross-account-amazon-ecr-access-for-aws-lambda/