Closed agfunderburg10 closed 1 year ago
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
This PR was automatically closed because of stale in 10 days
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
Updated creation of aws_lambda_function_event_invoke_config resources so that there is a dependency. This is to force synchronous processing.
Motivation and Context
Fixes open issue https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/419 When these resources are created asynchronously, they can cause a racing condition error:
The EventInvokeConfig for function arn:aws:lambda:eu-central-1:<ACCOUNT_ID>:function:tracking-enrichment-stage-search-enriched-to-aurora:$LATEST could not be updated due to a concurrent update operation.
By adding a synchronous dependency, this is resolved.Breaking Changes
It does not break backward compatibility.
How Has This Been Tested?
[x] I have updated at least one of the
examples/*
to demonstrate and validate my change(s) I did not update an example, as the alias example already had the necessary values available.[x] I have tested and validated these changes using one or more of the provided
examples/*
projects I executed deployment of the alias example. I then re-deployed it with my changes. With the update, a state change will take place for these resources. The change is as follows: module.lambda_function.aws_lambda_function_event_invoke_config.this["unqualified_alias"] >> module.lambda_function.aws_lambda_function_event_invoke_config.unqualified_alias["unqualified_alias"] module.alias_no_refresh.aws_lambda_function_event_invoke_config.this["qualified_alias"] >> module.alias_no_refresh.aws_lambda_function_event_invoke_config.qualified_alias["qualified_alias"]I also deployed the component fresh. Both scenarios deployed with no issues.
pre-commit run -a
on my pull request