Hello everyone. I’m trying to create a Lambda Resource Policy in AWS using TF. Per the documentation, aws_lambda_permission seems to be the way to do this. However, what seems to be missing is the ability to use conditions.
How can a Lambda resource policy with a condition be created using Terraform?
For example, a resource policy that denies invoking the Lambda based on IP address or originating organization ID:
It appears the condition is defined in your json block, have you tried running the above into the resource_iam_role -> assume_role_policy? I could be entirely wrong I lean more towards Azure. I can try and spin it up later my AWS and get back to you.