title: How do you create an archive file in Terraform?
body: <p>I have this code in terraform:</p>
  <pre><code>data &quot;archive_file&quot; &quot;lambdazip&quot; {
  
    type        = &quot;zip&quot;
    output_path = &quot;lambda_launcher.zip&quot;
  
    source_dir = &quot;lambda/etc&quot;
    source_dir = &quot;lambda/node_modules&quot;
  
    source {
      content  = &quot;${data.template_file.config_json.rendered}&quot;
      filename = &quot;config.json&quot;
    }
  }
  </code></pre>
  <p>I get the following errors when I do <code>terraform plan</code>:</p>
  <pre><code>* data.archive_file.lambdazip: &quot;source&quot;: conflicts with source_dir 
  (&quot;lambda/node_modules&quot;)
  * data.archive_file.lambdazip: &quot;source_content_filename&quot;: conflicts 
  with source_dir (&quot;lambda/node_modules&quot;)
  * data.archive_file.lambdazip: &quot;source_dir&quot;: conflicts with 
  source_content_filename (&quot;/home/user1/experiments/grascenote-
  poc/init.tpl&quot;)
  </code></pre>
  <p>I am using terraform version v0.9.11</p>