Skip to content

Commit bfa4b87

Browse files
authored
Merge pull request #4 from osodevops/depreciations
Depreciations
2 parents a77a93d + f714692 commit bfa4b87

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ File a GitHub [issue](https://github.com/osodevops/aws-terraform-module-lambda-a
7979

8080
## The legals
8181

82-
Copyright © 2017-2024 [OSO](https://oso.sh) | See [LICENCE](LICENSE) for full details.
82+
Copyright © 2017-2025 [OSO](https://oso.sh) | See [LICENCE](LICENSE) for full details.
8383

8484
[<img src="https://oso-public-resources.s3.eu-west-1.amazonaws.com/oso-logo-green.png" alt="OSO who we are" width="250"/>](https://oso.sh/who-we-are/)
8585

aws_lambda_function.tf

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Create the Lambda function. Each new apply will publish a new version.
22
resource "aws_lambda_function" "lambda" {
3-
function_name = var.function_name
4-
description = var.description
5-
provider = aws.cloudfront
3+
function_name = var.function_name
4+
description = var.description
5+
provider = aws.cloudfront
66
# Find the file from S3
77
s3_bucket = data.aws_s3_bucket.artifact_bucket.id
8-
s3_key = aws_s3_bucket_object.artifact.id
9-
s3_object_version = aws_s3_bucket_object.artifact.version_id
8+
s3_key = aws_s3_object.artifact.id
9+
s3_object_version = aws_s3_object.artifact.version_id
1010

1111
publish = true
1212
handler = var.lambda_handler
@@ -15,13 +15,12 @@ resource "aws_lambda_function" "lambda" {
1515

1616
lifecycle {
1717
ignore_changes = [
18-
last_modified,
1918
filename
2019
]
2120
}
2221

2322
tags = merge(var.common_tags, {
2423
"Name" = "${upper(var.environment)}-LOG-COLLECTOR-LAMBDA"
25-
},
24+
},
2625
)
2726
}
+9-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
2-
* Upload the build artifact zip file to S3.
2+
* Upload the build artifact zip file to S3 using aws_s3_object.
33
*
44
*/
5-
resource "aws_s3_bucket_object" "artifact" {
6-
provider = aws.cloudfront
7-
bucket = data.aws_s3_bucket.artifact_bucket.id
8-
key = "${var.function_name}.zip"
9-
source = data.archive_file.zip_file_for_lambda.output_path
10-
etag = filemd5(data.archive_file.zip_file_for_lambda.output_path)
11-
tags = var.common_tags
12-
}
5+
resource "aws_s3_object" "artifact" {
6+
provider = aws.cloudfront
7+
bucket = data.aws_s3_bucket.artifact_bucket.id
8+
key = "${var.function_name}.zip"
9+
source = data.archive_file.zip_file_for_lambda.output_path
10+
etag = filemd5(data.archive_file.zip_file_for_lambda.output_path)
11+
tags = var.common_tags
12+
}

0 commit comments

Comments
 (0)