Skip to content

Commit

Permalink
fix: Fix file type lookup for files with no extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Kim committed Feb 16, 2023
1 parent f13773d commit e854da1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/s3_website/s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ resource "aws_s3_object" "content" {

source = "${var.source_dir}/${each.value}"
etag = filemd5("${var.source_dir}/${each.value}")
content_type = lookup(local.file_types, regex("\\.[^.]+$", each.value), null)
content_type = lookup(local.file_types, try(regex("\\.[^.]+$", each.value), ""), null)
}

0 comments on commit e854da1

Please sign in to comment.