To correct this, rather than using the filemd5()
function over the output_path
property, instead use the output_md5
property, like so:
data "archive_file" "my_file" {
# ...
}
resource "aws_s3_object" "my_object" {
# ...
etag = data.archive_file.my_file.output_md5
# ...
}