Skip to content

Notification creation race condition #34

@roger-ce

Description

@roger-ce

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions