title: Variables in logstash config not substituted
body: <p>None of the variables in <em>prefix</em> are substituted - why? </p>
  
  <p><em>It was working with on old version of logstash (1.5.4) but doesn't anymore with 2.3.</em></p>
  
  <p>Part of the output filter in logstash.cfg (<a href="https://github.com/logstash-plugins/logstash-output-s3" rel="nofollow">dumps to s3</a>):</p>
  
  <pre><code>output {
    if [bucket] == "bucket1" {
       s3 {
         bucket =&gt; "bucket1"
         access_key_id =&gt; "****"
         secret_access_key =&gt; "****"
         region =&gt; "ap-southeast-2"
         prefix =&gt; "%{env}/%{year}/%{month}/%{day}/"
         size_file =&gt; 50000000 #50mb
         time_file =&gt; 1
         codec =&gt; json_lines # save log as json line (no newlines)
         temporary_directory =&gt; "/var/log/temp-logstash"
         tags =&gt; ["bucket1"]
       }
    }
    ..
  }
  </code></pre>
  
  <p>Example dataset (taken from stdout):</p>
  
  <pre><code>{
      "random_person" =&gt; "Kenneth Cumming 2016-04-14 00:53:59.777647",
         "@timestamp" =&gt; "2016-04-14T00:53:59.917Z",
               "host" =&gt; "192.168.99.1",
               "year" =&gt; "2016",
              "month" =&gt; "04",
                "day" =&gt; "14",
                "env" =&gt; "dev",
             "bucket" =&gt; "bucket1"
  }
  </code></pre>
  
  <p>Just in case, here is the filter:</p>
  
  <pre><code>filter {
    mutate {
      add_field =&gt; {
        "request_uri" =&gt; "%{[headers][request_path]}"
      }
    }
    grok {
      break_on_match =&gt; false # default behaviour is to stop matching after first match, we don't want that
      match =&gt; { "@timestamp" =&gt; "%{NOTSPACE:date}T%{NOTSPACE:time}Z"} # break timestamp field into date and time
      match =&gt; { "date" =&gt; "%{INT:year}-%{INT:month}-%{INT:day}"} # break date into year month and day fields
      match =&gt; { "request_uri" =&gt; "/%{WORD:env}/%{NOTSPACE:bucket}"} # break request uri into environment and bucket fields
    }
    mutate {
        remove_field =&gt; ["request_uri", "headers", "@version", "date", "time"]
    }
  
  }
  </code></pre>