Skip to content

Commit c0e11d6

Browse files
committed
version
1 parent 486285e commit c0e11d6

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

terraform/redis_sync_lambda.tf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@ resource "aws_lambda_function" "redis_sync_lambda" {
5050
]
5151
}
5252

53+
resource "aws_lambda_version" "redis_sync_lambda_version" {
54+
function_name = aws_lambda_function.redis_sync_lambda.arn
55+
description = "Automatic version for redis_sync_lambda"
56+
provisioned_concurrent_executions = 0
57+
58+
# This ensures a new version is published when the code or config changes
59+
lifecycle {
60+
create_before_destroy = true
61+
}
62+
}
63+
64+
output "redis_sync_lambda_version" {
65+
value = aws_lambda_version.redis_sync_lambda_version.version
66+
description = "The published version number of the redis_sync_lambda Lambda function"
67+
}
68+
5369
# Permission for S3 to invoke Lambda function
5470
resource "aws_lambda_permission" "redis_sync_s3_invoke_permission" {
5571
statement_id = "AllowExecutionFromS3"

0 commit comments

Comments
 (0)