File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
5470resource "aws_lambda_permission" "redis_sync_s3_invoke_permission" {
5571 statement_id = " AllowExecutionFromS3"
You can’t perform that action at this time.
0 commit comments