Skip to content

Commit 6bfb5ca

Browse files
committed
Deprecated Resource use aws_s3_object instead of aws_s3_bucket_object
╷ │ Warning: Deprecated Resource │ │ with module.security_header_lambda.aws_s3_bucket_object.artifact, │ on .terraform/modules/security_header_lambda/aws_s3_bucket_object_artifact_upload.tf line 5, in resource "aws_s3_bucket_object" "artifact": │ 5: resource "aws_s3_bucket_object" "artifact" { │ │ use the aws_s3_object resource instead │ │ (and one more similar warning elsewhere) ╵ ╷ │ Warning: Argument is deprecated │ │ with module.security_header_lambda.aws_s3_bucket_object.artifact, │ on .terraform/modules/security_header_lambda/aws_s3_bucket_object_artifact_upload.tf line 7, in resource "aws_s3_bucket_object" "artifact": │ 7: bucket = data.aws_s3_bucket.artifact_bucket.id │ │ Use the aws_s3_object resource instead │ │ (and one more similar warning elsewhere)
1 parent 7474e06 commit 6bfb5ca

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed
+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)