Skip to content

Commit 1de4271

Browse files
committed
Fix: Race between layer and Lambda update (#5927)
1 parent b177ed9 commit 1de4271

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/azul/terraform.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,10 @@ def tf_config(self, app_name):
708708
for resource in resources['aws_lambda_function'].values():
709709
assert 'layers' not in resource
710710
resource['layers'] = ['${aws_lambda_layer_version.dependencies.arn}']
711+
# Publishing the Lambda function as a new version prevents possible
712+
# race conditions when an update to the function's configuration and
713+
# code rely on the update of each other in order to work correctly.
714+
resource['publish'] = True
711715
env = config.es_endpoint_env(
712716
es_endpoint=(
713717
aws.es_endpoint

0 commit comments

Comments
 (0)