title: File not found when trying to use etag
body: <p>I am trying to use <code>etag</code> when i update my bucket S3, but i get this error:</p>
  
  <pre><code>Error: Error in function call
     on config.tf line 48, in resource "aws_s3_bucket_object" "bucket_app":
     48:   etag = filemd5("${path.module}/${var.env}/app-config.json")
       |----------------
       | path.module is "."
       | var.env is "develop"
   Call to function "filemd5" failed: no file exists at develop/app-config.json.
  </code></pre>
  
  <p>However, this works fine:</p>
  
  <pre><code>resource "aws_s3_bucket_object" "bucket_app" {
    bucket = "${var.app}-${var.env}-app-assets"
    key    = "config.json"
    source = "${path.module}/${var.env}/app-config.json"
  
    // etag = filemd5("${path.module}/${var.env}/app-config.json")
  
    depends_on = [
      local_file.app_config_json
    ]
  }
  </code></pre>
  
  <p>I am genereting the file this way:</p>
  
  <pre><code>resource "local_file" "app_config_json" {
    content  = local.app_config_json
    filename = "${path.module}/${var.env}/app-config.json"
  }
  </code></pre>
  
  <p>I really don't get what i am doing wrong...</p>