title: Getting InvalidParameterException while trying to setup cloudwatch log filter via terraform
body: <p>I am trying to setup cloudwatch log filter using terrafom using below resource element (The logs are in the default format):</p>
  <pre><code>resource &quot;aws_cloudwatch_log_metric_filter&quot; &quot;exception-filter&quot; {
    name           = &quot;Exception filter&quot;
    pattern        = &quot;Exception:&quot;
    log_group_name = &quot;/ecs/application/log&quot;
    metric_transformation {
      name          = &quot;Exceptions&quot;
      namespace     = &quot;app-custom&quot;
      value         = &quot;1&quot;
      default_value = &quot;0&quot;
    }
  }
  </code></pre>
  <p>The terraform apply command fails stating InvalidParameterException: Invalid metric filter pattern.</p>
  <p>I tried to escape &quot;:&quot; using \ but doing do also I got an error that the symbol &quot;:&quot; is not a valid escape.</p>
  <p>Is there any other way to specify the pattern here?</p>