-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Can this module be used as ECR for lambda image code? #34
Can this module be used as ECR for lambda image code? #34
Comments
Here you can find the code to use Lambda with ECR resources. I have just updated it (terraform-aws-modules/terraform-aws-lambda#559) and included integration with this ECR repository - https://github.com/terraform-aws-modules/terraform-aws-lambda/blob/master/examples/container-image/main.tf |
Thanks. This example: https://github.com/terraform-aws-modules/terraform-aws-ecr/blob/master/examples/complete/main.tf still lacks how to set the lambda policy (LambdaECRImageRetrievalPolicy) though, or any custom policy. Nevermind, have abandoned the use of this module and built as resources instead. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
I want to use this module, if possible, to host local AWS account lambda ECR code images. I am having trouble with the policies however. Could the examples be updated if possible to reflect how appropriate policies would be set for lambda to consume the ECR images as code? For that matter could any example show how to set a custom policy, or to ignore changes to policy (made by other AWS services - lambda)?
I can see input: repository_lambda_read_access_arns will result in a policy of:
this is almost a match on what lambda itself seems to want to set on the ECR, this permission appears after lambda is set to grab the ECR image:
I am unsure if this is just a user error my end or a feature request sorry.
I should also add that an initial build of the ECR with this module and then a lambda build to reference the ECR as code image does work at first. Where things go awry is any future terraform apply will look to strip the added policy that lambda has added, and this results in permissions errors for Lambda then not being allowed to access the ECR.
If your request is for a new feature, please use the
Feature request
template.Before you submit an issue, please perform the following first:
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
terraform init
Versions
Module version [Required]:
Terraform version:
Reproduction Code [Required]
Steps to reproduce the behavior:
Expected behavior
Actual behavior
Terminal Output Screenshot(s)
Additional context
The text was updated successfully, but these errors were encountered: