title: How can I override a resource in a Terraform module?
body: <p>I've got a Terraform module like this:</p>
  <pre><code>module &quot;helloworld&quot; {
    source = &quot;../service&quot;
  }
  </code></pre>
  <p>and <code>../service</code> contains:</p>
  <pre><code>resource &quot;aws_cloudwatch_metric_alarm&quot; &quot;cpu_max&quot; {
    comparison_operator = &quot;GreaterThanOrEqualToThreshold&quot;
    evaluation_periods  = &quot;2&quot;
    ... etc
  }
  </code></pre>
  <p>How do you override the <code>service</code> variables <code>comparison_operator</code> and <code>evaluation_periods</code> in your module?</p>
  <p>E.g. to set <code>cpu_max</code> to <code>4</code> is it as simple as <code>aws_cloudwatch_metric_alarm .cpu_max.evaluation_periods = 4</code> in your module?</p>