Notification creation race condition
Opened this issue · 1 comments
roger-ce commented
I seem to be running into a race condition where the 'scan' Lambda resource is just a second or two too slow being created, so when TF tries to add the Notification(s), the Lambda ARN doesn't exist yet. This leads me to have to run the apply twice, at which point it finishes successfully, but is particularly annoying when running in a CI/CD pipeline.
Could a simple 'depends_on = [aws_lambda_function.main_scan]' be added to the bucket notification resource definition please? I can raise a PR if that's easier.
Thanks!