diff --git a/terraform/main.tf b/terraform/main.tf index f181c3f5..5d35a20f 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -23,24 +23,27 @@ resource "aws_s3_bucket" "lambda_source" { } resource "aws_s3_object" "lambda_source" { - bucket = aws_s3_bucket.lambda_source.bucket - key = "${filemd5(local.lambda_source_filename)}.zip" - source = local.lambda_source_filename - etag = filemd5(local.lambda_source_filename) + bucket = aws_s3_bucket.lambda_source.bucket + key = "${filemd5(local.lambda_source_filename)}.zip" + source = local.lambda_source_filename + source_hash = filemd5(local.lambda_source_filename) + tags = var.tags } resource "aws_s3_object" "lambda_code_dependency_archive" { - bucket = aws_s3_bucket.lambda_source.bucket - key = "${filemd5(local.dependency_layer_filename)}.zip" - source = local.dependency_layer_filename - etag = filemd5(local.dependency_layer_filename) + bucket = aws_s3_bucket.lambda_source.bucket + key = "${filemd5(local.dependency_layer_filename)}.zip" + source = local.dependency_layer_filename + source_hash = filemd5(local.dependency_layer_filename) + tags = var.tags } resource "aws_s3_object" "cloudformation_template" { - bucket = aws_s3_bucket.lambda_source.bucket - key = "${filemd5(local.cloudformation_template_filename)}.yaml" - source = local.cloudformation_template_filename - etag = filemd5(local.cloudformation_template_filename) + bucket = aws_s3_bucket.lambda_source.bucket + key = "${filemd5(local.cloudformation_template_filename)}.yaml" + source = local.cloudformation_template_filename + source_hash = filemd5(local.cloudformation_template_filename) + tags = var.tags } resource "aws_cloudformation_stack" "thin_egress_app" {