-
-
Notifications
You must be signed in to change notification settings - Fork 693
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
fix: Lambda should depend on policy attachments #327
fix: Lambda should depend on policy attachments #327
Conversation
When the lambda is created the execution-role with all its policies should be in place. Some policies like VPC are a hard requirement for lambda creation which fill fail if they are not already in place.
47cd415
to
01cfe9c
Compare
Appreciate the fix. I am having the same issue. |
The same applies if you destroy the stack. First, the policies are then removed, which means that the Lambda no longer has rights to remove the ENIs and Terraform therefore cannot remove the security group because it is still "in-use" by these ENIs. |
### [4.0.1](v4.0.0...v4.0.1) (2022-09-01) ### Bug Fixes * Lambda should depend on policy attachments ([#327](#327)) ([b4eef74](b4eef74))
This PR is included in version 4.0.1 🎉 |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Added all policy-attachments to the deponds_on of the 'aws_lambda_function'
Motivation and Context
When the lambda is created the execution-role with all its
policies should be in place.
Some policies like VPC are a hard requirement for lambda creation
which fill fail if they are not already in place.
Fixes #326
Breaking Changes
May introduce circular dependencies, where policies some how depend on the lambda.
Those policies could created / attached outside of this module.
How Has This Been Tested?
examples/with-vpc
pre-commit run -a
on my pull request